xref: /illumos-gate/usr/src/cmd/fs.d/nfs/mount/Makefile (revision a5f20e891eb1b5d2af2255e766a1dc3b35ac9936)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
506e1a714Sraf# Common Development and Distribution License (the "License").
606e1a714Sraf# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
21b56bf881SAntonello Cruz# Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
225661bb76SJohn Levon# Copyright 2018, Joyent, Inc. All rights reserved.
237c478bd9Sstevel@tonic-gate#
247c478bd9Sstevel@tonic-gate# cmd/fs.d/nfs/mount/Makefile
257c478bd9Sstevel@tonic-gate
267c478bd9Sstevel@tonic-gateFSTYPE=		nfs
277c478bd9Sstevel@tonic-gateLIBPROG=	mount
287c478bd9Sstevel@tonic-gateROOTFS_PROG=	$(LIBPROG)
297c478bd9Sstevel@tonic-gate
307c478bd9Sstevel@tonic-gate# duplicate ROOTLIBFSTYPE value needed for installation rule
317c478bd9Sstevel@tonic-gate# we must define this before including Makefile.fstype
327c478bd9Sstevel@tonic-gateROOTLIBFSTYPE = $(ROOT)/usr/lib/fs/$(FSTYPE)
337c478bd9Sstevel@tonic-gate$(ROOTLIBFSTYPE)/%:	$(ROOTLIBFSTYPE) %
347c478bd9Sstevel@tonic-gate	$(RM) $@; $(SYMLINK) ../../../../etc/fs/$(FSTYPE)/$(LIBPROG) $@
357c478bd9Sstevel@tonic-gate
367c478bd9Sstevel@tonic-gateinclude		../../Makefile.fstype
377c478bd9Sstevel@tonic-gate
38dd51520eSPavan Mettu - Oracle Corporation - Menlo Park United StatesCOMMON= $(FSLIB) nfs_sec.o replica.o nfs_subr.o selfcheck.o smfcfg.o
397c478bd9Sstevel@tonic-gateOBJS=	$(LIBPROG).o $(COMMON) webnfs_client.o webnfs_xdr.o
407c478bd9Sstevel@tonic-gateSRCS=	$(LIBPROG).c $(FSLIBSRC) ../lib/nfs_sec.c ../lib/replica.c \
41dd51520eSPavan Mettu - Oracle Corporation - Menlo Park United States	../lib/nfs_subr.c webnfs_xdr.c webnfs_client.c ../lib/selfcheck.c \
42dd51520eSPavan Mettu - Oracle Corporation - Menlo Park United States	../lib/smfcfg.c
437c478bd9Sstevel@tonic-gate
447c478bd9Sstevel@tonic-gateUNCHECKED_HDRS=	webnfs.h
457c478bd9Sstevel@tonic-gate
467014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses
477014882cSRichard LoweCERRWARN += -_gcc=-Wno-switch
487014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable
49*d3b5f563SJohn LevonCERRWARN += $(CNOWARN_UNINIT)
507014882cSRichard LoweCERRWARN += -_gcc=-Wno-address
517014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-function
527014882cSRichard Lowe
535661bb76SJohn Levon# unknown type for func
545661bb76SJohn LevonSMATCH=off
555661bb76SJohn Levon
567c478bd9Sstevel@tonic-gate#
577c478bd9Sstevel@tonic-gate# Message catalog
587c478bd9Sstevel@tonic-gate#
597c478bd9Sstevel@tonic-gatePOFILE= mount.po
607c478bd9Sstevel@tonic-gate
61b56bf881SAntonello CruzLDLIBS += -lrpcsvc -lnsl -lsocket -lscf
627c478bd9Sstevel@tonic-gateCPPFLAGS += -I. -I../.. -I../lib
637c478bd9Sstevel@tonic-gateCFLAGS += $(CCVERBOSE)
647c478bd9Sstevel@tonic-gate
657c478bd9Sstevel@tonic-gatenfs_sec.o :=	CPPFLAGS += -DWNFS_SEC_NEGO
667c478bd9Sstevel@tonic-gate
677c478bd9Sstevel@tonic-gateROOTETCPROG	= $(LIBPROG:%=$(ROOTETCFSTYPE)/%)
687c478bd9Sstevel@tonic-gateCLOBBERFILES	+= $(LIBPROG)
697c478bd9Sstevel@tonic-gate
707c478bd9Sstevel@tonic-gate.KEEP_STATE:
717c478bd9Sstevel@tonic-gate
727c478bd9Sstevel@tonic-gateall:	$(ROOTFS_PROG)
737c478bd9Sstevel@tonic-gate
747c478bd9Sstevel@tonic-gate$(LIBPROG):	webnfs.h $(OBJS)
757c478bd9Sstevel@tonic-gate		$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
767c478bd9Sstevel@tonic-gate		$(POST_PROCESS)
777c478bd9Sstevel@tonic-gate
787c478bd9Sstevel@tonic-gatenfs_sec.o:	../lib/nfs_sec.c
797c478bd9Sstevel@tonic-gate		$(COMPILE.c) ../lib/nfs_sec.c
807c478bd9Sstevel@tonic-gate
817c478bd9Sstevel@tonic-gatereplica.o:	../lib/replica.c
827c478bd9Sstevel@tonic-gate		$(COMPILE.c) ../lib/replica.c
837c478bd9Sstevel@tonic-gate
847c478bd9Sstevel@tonic-gatenfs_subr.o:	../lib/nfs_subr.c
857c478bd9Sstevel@tonic-gate		$(COMPILE.c) ../lib/nfs_subr.c
867c478bd9Sstevel@tonic-gate
877c478bd9Sstevel@tonic-gateselfcheck.o:	../lib/selfcheck.c
887c478bd9Sstevel@tonic-gate		$(COMPILE.c) ../lib/selfcheck.c
897c478bd9Sstevel@tonic-gate
907c478bd9Sstevel@tonic-gatenfs_tbind.o:	../lib/nfs_tbind.c
917c478bd9Sstevel@tonic-gate		$(COMPILE.c) ../lib/nfs_tbind.c
927c478bd9Sstevel@tonic-gate
93dd51520eSPavan Mettu - Oracle Corporation - Menlo Park United Statessmfcfg.o:	../lib/smfcfg.c
94dd51520eSPavan Mettu - Oracle Corporation - Menlo Park United States		$(COMPILE.c) ../lib/smfcfg.c
95dd51520eSPavan Mettu - Oracle Corporation - Menlo Park United States
967c478bd9Sstevel@tonic-gatewebnfs_xdr.c:	webnfs.x
97bfa62c28SVallish Vaidyeshwara	$(RPCGEN) -M -C -c -o $@ webnfs.x
987c478bd9Sstevel@tonic-gate
997c478bd9Sstevel@tonic-gatewebnfs_client.c:	webnfs.x
100bfa62c28SVallish Vaidyeshwara	$(RPCGEN) -M -C -l -o $@ webnfs.x
1017c478bd9Sstevel@tonic-gate
1027c478bd9Sstevel@tonic-gatewebnfs.h:	webnfs.x
103bfa62c28SVallish Vaidyeshwara	$(RPCGEN) -M -C -h -o $@ webnfs.x
1047c478bd9Sstevel@tonic-gate
1057c478bd9Sstevel@tonic-gatewebnfs.x:	../lib/webnfs.x
1067c478bd9Sstevel@tonic-gate		$(RM) webnfs.x
1077c478bd9Sstevel@tonic-gate		cp ../lib/webnfs.x .
1087c478bd9Sstevel@tonic-gate
1097c478bd9Sstevel@tonic-gate#
1107c478bd9Sstevel@tonic-gate# message catalog
1117c478bd9Sstevel@tonic-gate#
1127c478bd9Sstevel@tonic-gatecatalog: $(POFILE)
1137c478bd9Sstevel@tonic-gate
1149e01f109SJason King$(POFILE): $(SRCS) webnfs.h
1157c478bd9Sstevel@tonic-gate	$(RM) $@
1167c478bd9Sstevel@tonic-gate	$(COMPILE.cpp) $(SRCS)   > $(POFILE).i
1177c478bd9Sstevel@tonic-gate	$(XGETTEXT)     $(XGETFLAGS) $(POFILE).i
1187c478bd9Sstevel@tonic-gate	sed "/^domain/d"        messages.po     > $@
1197c478bd9Sstevel@tonic-gate	$(RM) $(POFILE).i messages.po
1207c478bd9Sstevel@tonic-gate
1217c478bd9Sstevel@tonic-gateinstall:	$(ROOTETCPROG)
1227c478bd9Sstevel@tonic-gate
1237c478bd9Sstevel@tonic-gateclean:
1247c478bd9Sstevel@tonic-gate	$(RM) $(OBJS) webnfs.x webnfs.h webnfs_xdr.c webnfs_client.c
125