xref: /illumos-gate/usr/src/cmd/fs.d/nfs/mount/Makefile (revision bb25c06cca41ca78e5fb87fbb8e81d55beb18c95)
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#
22# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27# cmd/fs.d/nfs/mount/Makefile
28
29FSTYPE=		nfs
30LIBPROG=	mount
31ROOTFS_PROG=	$(LIBPROG)
32
33# duplicate ROOTLIBFSTYPE value needed for installation rule
34# we must define this before including Makefile.fstype
35ROOTLIBFSTYPE = $(ROOT)/usr/lib/fs/$(FSTYPE)
36$(ROOTLIBFSTYPE)/%:	$(ROOTLIBFSTYPE) %
37	$(RM) $@; $(SYMLINK) ../../../../etc/fs/$(FSTYPE)/$(LIBPROG) $@
38
39include		../../Makefile.fstype
40
41COMMON= $(FSLIB) nfs_sec.o replica.o nfs_subr.o selfcheck.o
42OBJS=	$(LIBPROG).o $(COMMON) webnfs_client.o webnfs_xdr.o
43SRCS=	$(LIBPROG).c $(FSLIBSRC) ../lib/nfs_sec.c ../lib/replica.c \
44	../lib/nfs_subr.c webnfs_xdr.c webnfs_client.c ../lib/selfcheck.c
45
46UNCHECKED_HDRS=	webnfs.h
47
48#
49# Message catalog
50#
51POFILE= mount.po
52
53LDLIBS += -lrpcsvc -lnsl -lsocket
54CPPFLAGS += -I. -I../.. -I../lib
55CFLAGS += $(CCVERBOSE)
56
57nfs_sec.o :=	CPPFLAGS += -DWNFS_SEC_NEGO
58
59ROOTETCPROG	= $(LIBPROG:%=$(ROOTETCFSTYPE)/%)
60CLOBBERFILES	+= $(LIBPROG)
61
62.KEEP_STATE:
63
64all:	$(ROOTFS_PROG)
65
66$(LIBPROG):	webnfs.h $(OBJS)
67		$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
68		$(POST_PROCESS)
69
70nfs_sec.o:	../lib/nfs_sec.c
71		$(COMPILE.c) ../lib/nfs_sec.c
72
73replica.o:	../lib/replica.c
74		$(COMPILE.c) ../lib/replica.c
75
76nfs_subr.o:	../lib/nfs_subr.c
77		$(COMPILE.c) ../lib/nfs_subr.c
78
79selfcheck.o:	../lib/selfcheck.c
80		$(COMPILE.c) ../lib/selfcheck.c
81
82nfs_tbind.o:	../lib/nfs_tbind.c
83		$(COMPILE.c) ../lib/nfs_tbind.c
84
85webnfs_xdr.c:	webnfs.x
86	$(RPCGEN) -C -c -o $@ webnfs.x
87
88webnfs_client.c:	webnfs.x
89	$(RPCGEN) -C -l -o $@ webnfs.x
90
91webnfs.h:	webnfs.x
92	$(RPCGEN) -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