xref: /titanic_51/usr/src/cmd/fs.d/nfs/mount/Makefile (revision 430b4c467020edf2445feb0c21db01c88b86243a)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21# Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
22#
23# cmd/fs.d/nfs/mount/Makefile
24
25FSTYPE=		nfs
26LIBPROG=	mount
27ROOTFS_PROG=	$(LIBPROG)
28
29# duplicate ROOTLIBFSTYPE value needed for installation rule
30# we must define this before including Makefile.fstype
31ROOTLIBFSTYPE = $(ROOT)/usr/lib/fs/$(FSTYPE)
32$(ROOTLIBFSTYPE)/%:	$(ROOTLIBFSTYPE) %
33	$(RM) $@; $(SYMLINK) ../../../../etc/fs/$(FSTYPE)/$(LIBPROG) $@
34
35include		../../Makefile.fstype
36
37COMMON= $(FSLIB) nfs_sec.o replica.o nfs_subr.o selfcheck.o smfcfg.o
38OBJS=	$(LIBPROG).o $(COMMON) webnfs_client.o webnfs_xdr.o
39SRCS=	$(LIBPROG).c $(FSLIBSRC) ../lib/nfs_sec.c ../lib/replica.c \
40	../lib/nfs_subr.c webnfs_xdr.c webnfs_client.c ../lib/selfcheck.c \
41	../lib/smfcfg.c
42
43UNCHECKED_HDRS=	webnfs.h
44
45#
46# Message catalog
47#
48POFILE= mount.po
49
50LDLIBS += -lrpcsvc -lnsl -lsocket -lscf
51CPPFLAGS += -I. -I../.. -I../lib
52CFLAGS += $(CCVERBOSE)
53
54nfs_sec.o :=	CPPFLAGS += -DWNFS_SEC_NEGO
55
56ROOTETCPROG	= $(LIBPROG:%=$(ROOTETCFSTYPE)/%)
57CLOBBERFILES	+= $(LIBPROG)
58
59.KEEP_STATE:
60
61all:	$(ROOTFS_PROG)
62
63$(LIBPROG):	webnfs.h $(OBJS)
64		$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
65		$(POST_PROCESS)
66
67nfs_sec.o:	../lib/nfs_sec.c
68		$(COMPILE.c) ../lib/nfs_sec.c
69
70replica.o:	../lib/replica.c
71		$(COMPILE.c) ../lib/replica.c
72
73nfs_subr.o:	../lib/nfs_subr.c
74		$(COMPILE.c) ../lib/nfs_subr.c
75
76selfcheck.o:	../lib/selfcheck.c
77		$(COMPILE.c) ../lib/selfcheck.c
78
79nfs_tbind.o:	../lib/nfs_tbind.c
80		$(COMPILE.c) ../lib/nfs_tbind.c
81
82smfcfg.o:	../lib/smfcfg.c
83		$(COMPILE.c) ../lib/smfcfg.c
84
85webnfs_xdr.c:	webnfs.x
86	$(RPCGEN) -M -C -c -o $@ webnfs.x
87
88webnfs_client.c:	webnfs.x
89	$(RPCGEN) -M -C -l -o $@ webnfs.x
90
91webnfs.h:	webnfs.x
92	$(RPCGEN) -M -C -h -o $@ webnfs.x
93
94webnfs.x:	../lib/webnfs.x
95		$(RM) webnfs.x
96		cp ../lib/webnfs.x .
97
98#
99# message catalog
100#
101catalog: $(POFILE)
102
103$(POFILE): $(SRCS)
104	$(RM) $@
105	$(COMPILE.cpp) $(SRCS)   > $(POFILE).i
106	$(XGETTEXT)     $(XGETFLAGS) $(POFILE).i
107	sed "/^domain/d"        messages.po     > $@
108	$(RM) $(POFILE).i messages.po
109
110install:	$(ROOTETCPROG)
111
112lint:	webnfs.h webnfs_xdr.c webnfs_client.c lint_SRCS
113
114clean:
115	$(RM) $(OBJS) webnfs.x webnfs.h webnfs_xdr.c webnfs_client.c
116