xref: /illumos-gate/usr/src/cmd/fs.d/nfs/mount/Makefile (revision bfa62c28)
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#
217c478bd9Sstevel@tonic-gate#
22*bfa62c28SVallish Vaidyeshwara# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate# cmd/fs.d/nfs/mount/Makefile
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gateFSTYPE=		nfs
287c478bd9Sstevel@tonic-gateLIBPROG=	mount
297c478bd9Sstevel@tonic-gateROOTFS_PROG=	$(LIBPROG)
307c478bd9Sstevel@tonic-gate
317c478bd9Sstevel@tonic-gate# duplicate ROOTLIBFSTYPE value needed for installation rule
327c478bd9Sstevel@tonic-gate# we must define this before including Makefile.fstype
337c478bd9Sstevel@tonic-gateROOTLIBFSTYPE = $(ROOT)/usr/lib/fs/$(FSTYPE)
347c478bd9Sstevel@tonic-gate$(ROOTLIBFSTYPE)/%:	$(ROOTLIBFSTYPE) %
357c478bd9Sstevel@tonic-gate	$(RM) $@; $(SYMLINK) ../../../../etc/fs/$(FSTYPE)/$(LIBPROG) $@
367c478bd9Sstevel@tonic-gate
377c478bd9Sstevel@tonic-gateinclude		../../Makefile.fstype
387c478bd9Sstevel@tonic-gate
397c478bd9Sstevel@tonic-gateCOMMON= $(FSLIB) nfs_sec.o replica.o nfs_subr.o selfcheck.o
407c478bd9Sstevel@tonic-gateOBJS=	$(LIBPROG).o $(COMMON) webnfs_client.o webnfs_xdr.o
417c478bd9Sstevel@tonic-gateSRCS=	$(LIBPROG).c $(FSLIBSRC) ../lib/nfs_sec.c ../lib/replica.c \
427c478bd9Sstevel@tonic-gate	../lib/nfs_subr.c webnfs_xdr.c webnfs_client.c ../lib/selfcheck.c
437c478bd9Sstevel@tonic-gate
447c478bd9Sstevel@tonic-gateUNCHECKED_HDRS=	webnfs.h
457c478bd9Sstevel@tonic-gate
467c478bd9Sstevel@tonic-gate#
477c478bd9Sstevel@tonic-gate# Message catalog
487c478bd9Sstevel@tonic-gate#
497c478bd9Sstevel@tonic-gatePOFILE= mount.po
507c478bd9Sstevel@tonic-gate
5106e1a714SrafLDLIBS += -lrpcsvc -lnsl -lsocket
527c478bd9Sstevel@tonic-gateCPPFLAGS += -I. -I../.. -I../lib
537c478bd9Sstevel@tonic-gateCFLAGS += $(CCVERBOSE)
547c478bd9Sstevel@tonic-gate
557c478bd9Sstevel@tonic-gatenfs_sec.o :=	CPPFLAGS += -DWNFS_SEC_NEGO
567c478bd9Sstevel@tonic-gate
577c478bd9Sstevel@tonic-gateROOTETCPROG	= $(LIBPROG:%=$(ROOTETCFSTYPE)/%)
587c478bd9Sstevel@tonic-gateCLOBBERFILES	+= $(LIBPROG)
597c478bd9Sstevel@tonic-gate
607c478bd9Sstevel@tonic-gate.KEEP_STATE:
617c478bd9Sstevel@tonic-gate
627c478bd9Sstevel@tonic-gateall:	$(ROOTFS_PROG)
637c478bd9Sstevel@tonic-gate
647c478bd9Sstevel@tonic-gate$(LIBPROG):	webnfs.h $(OBJS)
657c478bd9Sstevel@tonic-gate		$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
667c478bd9Sstevel@tonic-gate		$(POST_PROCESS)
677c478bd9Sstevel@tonic-gate
687c478bd9Sstevel@tonic-gatenfs_sec.o:	../lib/nfs_sec.c
697c478bd9Sstevel@tonic-gate		$(COMPILE.c) ../lib/nfs_sec.c
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gatereplica.o:	../lib/replica.c
727c478bd9Sstevel@tonic-gate		$(COMPILE.c) ../lib/replica.c
737c478bd9Sstevel@tonic-gate
747c478bd9Sstevel@tonic-gatenfs_subr.o:	../lib/nfs_subr.c
757c478bd9Sstevel@tonic-gate		$(COMPILE.c) ../lib/nfs_subr.c
767c478bd9Sstevel@tonic-gate
777c478bd9Sstevel@tonic-gateselfcheck.o:	../lib/selfcheck.c
787c478bd9Sstevel@tonic-gate		$(COMPILE.c) ../lib/selfcheck.c
797c478bd9Sstevel@tonic-gate
807c478bd9Sstevel@tonic-gatenfs_tbind.o:	../lib/nfs_tbind.c
817c478bd9Sstevel@tonic-gate		$(COMPILE.c) ../lib/nfs_tbind.c
827c478bd9Sstevel@tonic-gate
837c478bd9Sstevel@tonic-gatewebnfs_xdr.c:	webnfs.x
84*bfa62c28SVallish Vaidyeshwara	$(RPCGEN) -M -C -c -o $@ webnfs.x
857c478bd9Sstevel@tonic-gate
867c478bd9Sstevel@tonic-gatewebnfs_client.c:	webnfs.x
87*bfa62c28SVallish Vaidyeshwara	$(RPCGEN) -M -C -l -o $@ webnfs.x
887c478bd9Sstevel@tonic-gate
897c478bd9Sstevel@tonic-gatewebnfs.h:	webnfs.x
90*bfa62c28SVallish Vaidyeshwara	$(RPCGEN) -M -C -h -o $@ webnfs.x
917c478bd9Sstevel@tonic-gate
927c478bd9Sstevel@tonic-gatewebnfs.x:	../lib/webnfs.x
937c478bd9Sstevel@tonic-gate		$(RM) webnfs.x
947c478bd9Sstevel@tonic-gate		cp ../lib/webnfs.x .
957c478bd9Sstevel@tonic-gate
967c478bd9Sstevel@tonic-gate#
977c478bd9Sstevel@tonic-gate# message catalog
987c478bd9Sstevel@tonic-gate#
997c478bd9Sstevel@tonic-gatecatalog: $(POFILE)
1007c478bd9Sstevel@tonic-gate
1017c478bd9Sstevel@tonic-gate$(POFILE): $(SRCS)
1027c478bd9Sstevel@tonic-gate	$(RM) $@
1037c478bd9Sstevel@tonic-gate	$(COMPILE.cpp) $(SRCS)   > $(POFILE).i
1047c478bd9Sstevel@tonic-gate	$(XGETTEXT)     $(XGETFLAGS) $(POFILE).i
1057c478bd9Sstevel@tonic-gate	sed "/^domain/d"        messages.po     > $@
1067c478bd9Sstevel@tonic-gate	$(RM) $(POFILE).i messages.po
1077c478bd9Sstevel@tonic-gate
1087c478bd9Sstevel@tonic-gateinstall:	$(ROOTETCPROG)
1097c478bd9Sstevel@tonic-gate
1107c478bd9Sstevel@tonic-gatelint:	webnfs.h webnfs_xdr.c webnfs_client.c lint_SRCS
1117c478bd9Sstevel@tonic-gate
1127c478bd9Sstevel@tonic-gateclean:
1137c478bd9Sstevel@tonic-gate	$(RM) $(OBJS) webnfs.x webnfs.h webnfs_xdr.c webnfs_client.c
114