xref: /titanic_44/usr/src/cmd/fs.d/nfs/mount/Makefile (revision 3c112a2b34403220c06c3e2fcac403358cfba168)
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
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
42UNCHECKED_HDRS=	webnfs.h
43
44#
45# Message catalog
46#
47POFILE= mount.po
48
49LDLIBS += -lrpcsvc -lnsl -lsocket -lscf
50CPPFLAGS += -I. -I../.. -I../lib
51CFLAGS += $(CCVERBOSE)
52
53nfs_sec.o :=	CPPFLAGS += -DWNFS_SEC_NEGO
54
55ROOTETCPROG	= $(LIBPROG:%=$(ROOTETCFSTYPE)/%)
56CLOBBERFILES	+= $(LIBPROG)
57
58.KEEP_STATE:
59
60all:	$(ROOTFS_PROG)
61
62$(LIBPROG):	webnfs.h $(OBJS)
63		$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
64		$(POST_PROCESS)
65
66nfs_sec.o:	../lib/nfs_sec.c
67		$(COMPILE.c) ../lib/nfs_sec.c
68
69replica.o:	../lib/replica.c
70		$(COMPILE.c) ../lib/replica.c
71
72nfs_subr.o:	../lib/nfs_subr.c
73		$(COMPILE.c) ../lib/nfs_subr.c
74
75selfcheck.o:	../lib/selfcheck.c
76		$(COMPILE.c) ../lib/selfcheck.c
77
78nfs_tbind.o:	../lib/nfs_tbind.c
79		$(COMPILE.c) ../lib/nfs_tbind.c
80
81webnfs_xdr.c:	webnfs.x
82	$(RPCGEN) -M -C -c -o $@ webnfs.x
83
84webnfs_client.c:	webnfs.x
85	$(RPCGEN) -M -C -l -o $@ webnfs.x
86
87webnfs.h:	webnfs.x
88	$(RPCGEN) -M -C -h -o $@ webnfs.x
89
90webnfs.x:	../lib/webnfs.x
91		$(RM) webnfs.x
92		cp ../lib/webnfs.x .
93
94#
95# message catalog
96#
97catalog: $(POFILE)
98
99$(POFILE): $(SRCS)
100	$(RM) $@
101	$(COMPILE.cpp) $(SRCS)   > $(POFILE).i
102	$(XGETTEXT)     $(XGETFLAGS) $(POFILE).i
103	sed "/^domain/d"        messages.po     > $@
104	$(RM) $(POFILE).i messages.po
105
106install:	$(ROOTETCPROG)
107
108lint:	webnfs.h webnfs_xdr.c webnfs_client.c lint_SRCS
109
110clean:
111	$(RM) $(OBJS) webnfs.x webnfs.h webnfs_xdr.c webnfs_client.c
112