xref: /titanic_44/usr/src/cmd/fs.d/nfs/mount/Makefile (revision 49b225e1cfa7bbf7738d4df0a03f18e3283426eb)
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 2008 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# cmd/fs.d/nfs/mount/Makefile
26
27FSTYPE=		nfs
28LIBPROG=	mount
29ROOTFS_PROG=	$(LIBPROG)
30
31# duplicate ROOTLIBFSTYPE value needed for installation rule
32# we must define this before including Makefile.fstype
33ROOTLIBFSTYPE = $(ROOT)/usr/lib/fs/$(FSTYPE)
34$(ROOTLIBFSTYPE)/%:	$(ROOTLIBFSTYPE) %
35	$(RM) $@; $(SYMLINK) ../../../../etc/fs/$(FSTYPE)/$(LIBPROG) $@
36
37include		../../Makefile.fstype
38
39COMMON= $(FSLIB) nfs_sec.o replica.o nfs_subr.o selfcheck.o
40OBJS=	$(LIBPROG).o $(COMMON) webnfs_client.o webnfs_xdr.o
41SRCS=	$(LIBPROG).c $(FSLIBSRC) ../lib/nfs_sec.c ../lib/replica.c \
42	../lib/nfs_subr.c webnfs_xdr.c webnfs_client.c ../lib/selfcheck.c
43
44UNCHECKED_HDRS=	webnfs.h
45
46#
47# Message catalog
48#
49POFILE= mount.po
50
51LDLIBS += -lrpcsvc -lnsl -lsocket
52CPPFLAGS += -I. -I../.. -I../lib
53CFLAGS += $(CCVERBOSE)
54
55nfs_sec.o :=	CPPFLAGS += -DWNFS_SEC_NEGO
56
57ROOTETCPROG	= $(LIBPROG:%=$(ROOTETCFSTYPE)/%)
58CLOBBERFILES	+= $(LIBPROG)
59
60.KEEP_STATE:
61
62all:	$(ROOTFS_PROG)
63
64$(LIBPROG):	webnfs.h $(OBJS)
65		$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
66		$(POST_PROCESS)
67
68nfs_sec.o:	../lib/nfs_sec.c
69		$(COMPILE.c) ../lib/nfs_sec.c
70
71replica.o:	../lib/replica.c
72		$(COMPILE.c) ../lib/replica.c
73
74nfs_subr.o:	../lib/nfs_subr.c
75		$(COMPILE.c) ../lib/nfs_subr.c
76
77selfcheck.o:	../lib/selfcheck.c
78		$(COMPILE.c) ../lib/selfcheck.c
79
80nfs_tbind.o:	../lib/nfs_tbind.c
81		$(COMPILE.c) ../lib/nfs_tbind.c
82
83webnfs_xdr.c:	webnfs.x
84	$(RPCGEN) -M -C -c -o $@ webnfs.x
85
86webnfs_client.c:	webnfs.x
87	$(RPCGEN) -M -C -l -o $@ webnfs.x
88
89webnfs.h:	webnfs.x
90	$(RPCGEN) -M -C -h -o $@ webnfs.x
91
92webnfs.x:	../lib/webnfs.x
93		$(RM) webnfs.x
94		cp ../lib/webnfs.x .
95
96#
97# message catalog
98#
99catalog: $(POFILE)
100
101$(POFILE): $(SRCS)
102	$(RM) $@
103	$(COMPILE.cpp) $(SRCS)   > $(POFILE).i
104	$(XGETTEXT)     $(XGETFLAGS) $(POFILE).i
105	sed "/^domain/d"        messages.po     > $@
106	$(RM) $(POFILE).i messages.po
107
108install:	$(ROOTETCPROG)
109
110lint:	webnfs.h webnfs_xdr.c webnfs_client.c lint_SRCS
111
112clean:
113	$(RM) $(OBJS) webnfs.x webnfs.h webnfs_xdr.c webnfs_client.c
114