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