Merge remote-tracking branch 'origin/master'
[unleashed/lotheac.git] / usr / src / cmd / fs.d / nfs / mount / Makefile
blob7791f4892a519c65d93c247f4036cc83d5be4019
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
21 # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
22 # Copyright 2018, Joyent, Inc. All rights reserved.
24 # cmd/fs.d/nfs/mount/Makefile
26 FSTYPE= nfs
27 LIBPROG= mount
28 ROOTFS_PROG= $(LIBPROG)
30 # duplicate ROOTLIBFSTYPE value needed for installation rule
31 # we must define this before including Makefile.fstype
32 ROOTLIBFSTYPE = $(ROOT)/usr/lib/fs/$(FSTYPE)
33 $(ROOTLIBFSTYPE)/%: $(ROOTLIBFSTYPE) %
34 $(RM) $@; $(SYMLINK) ../../../../etc/fs/$(FSTYPE)/$(LIBPROG) $@
36 include ../../Makefile.fstype
38 COMMON= $(FSLIB) nfs_sec.o replica.o nfs_subr.o selfcheck.o smfcfg.o
39 OBJS= $(LIBPROG).o $(COMMON) webnfs_client.o webnfs_xdr.o
40 SRCS= $(LIBPROG).c $(FSLIBSRC) ../lib/nfs_sec.c ../lib/replica.c \
41 ../lib/nfs_subr.c webnfs_xdr.c webnfs_client.c ../lib/selfcheck.c \
42 ../lib/smfcfg.c
44 UNCHECKED_HDRS= webnfs.h
46 CERRWARN += -Wno-parentheses
47 CERRWARN += -Wno-switch
48 CERRWARN += -Wno-unused-variable
49 CERRWARN += -Wno-uninitialized
50 CERRWARN += -Wno-address
51 CERRWARN += -Wno-unused-function
53 # unknown type for func
54 SMATCH=off
57 # Message catalog
59 POFILE= mount.po
61 LDLIBS += -lrpcsvc -lscf
62 CPPFLAGS += -I. -I../.. -I../lib
64 nfs_sec.o := CPPFLAGS += -DWNFS_SEC_NEGO
66 ROOTETCPROG = $(LIBPROG:%=$(ROOTETCFSTYPE)/%)
67 CLOBBERFILES += $(LIBPROG)
69 .KEEP_STATE:
71 all: $(ROOTFS_PROG)
73 $(LIBPROG): webnfs.h $(OBJS)
74 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
75 $(POST_PROCESS)
77 nfs_sec.o: ../lib/nfs_sec.c
78 $(COMPILE.c) ../lib/nfs_sec.c
80 replica.o: ../lib/replica.c
81 $(COMPILE.c) ../lib/replica.c
83 nfs_subr.o: ../lib/nfs_subr.c
84 $(COMPILE.c) ../lib/nfs_subr.c
86 selfcheck.o: ../lib/selfcheck.c
87 $(COMPILE.c) ../lib/selfcheck.c
89 nfs_tbind.o: ../lib/nfs_tbind.c
90 $(COMPILE.c) ../lib/nfs_tbind.c
92 smfcfg.o: ../lib/smfcfg.c
93 $(COMPILE.c) ../lib/smfcfg.c
95 webnfs_xdr.c: webnfs.x
96 $(RPCGEN) -M -C -c -o $@ webnfs.x
98 webnfs_client.c: webnfs.x
99 $(RPCGEN) -M -C -l -o $@ webnfs.x
101 webnfs.h: webnfs.x
102 $(RPCGEN) -M -C -h -o $@ webnfs.x
104 webnfs.x: ../lib/webnfs.x
105 $(RM) webnfs.x
106 cp ../lib/webnfs.x .
109 # message catalog
111 catalog: $(POFILE)
113 $(POFILE): $(SRCS) webnfs.h
114 $(RM) $@
115 $(COMPILE.cpp) $(SRCS) > $(POFILE).i
116 $(XGETTEXT) $(XGETFLAGS) $(POFILE).i
117 sed "/^domain/d" messages.po > $@
118 $(RM) $(POFILE).i messages.po
120 install: $(ROOTETCPROG)
123 clean:
124 $(RM) $(OBJS) webnfs.x webnfs.h webnfs_xdr.c webnfs_client.c