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]
21 # Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
23 # cmd/fs.d/autofs/Makefile
32 LIBPROG
= $(AUTO
) $(MOUNT
) $(DFSHARES
) $(SHARE
) $(UNSHARE
)
35 LINKINSTALL
= $(ROOTUSRSBIN
)/$(AUTO
)
36 LINKVALUE
= ..
/lib
/fs
/$(FSTYPE
)/$(AUTO
)
37 MAPS
= auto_master auto_home
38 MAPINSTALL
= $(MAPS
:%=$(ROOTETC
)/%)
40 DEFAULTFILES
= autofs.dfl
41 SMFMANIFEST
= autofs.xml
43 MFSTINSTALL
= $(SMFMANIFEST
:%=$(ROOTSVCSYSTEM
)/filesystem
/%)
44 METHODINSTALL
= $(SMFMETHOD
:%=$(ROOTLIBSVCMETHOD
)/%)
46 OTHERINSTALL
= $(MAPINSTALL
) $(LINKINSTALL
) $(ROOTETCDEFAULTFILES
) \
47 $(MFSTINSTALL
) $(METHODINSTALL
)
49 UNCHECKED_HDRS
= webnfs.h
54 include ..
/Makefile.fstype
56 $(MAPINSTALL
) := FILEMODE
= 0644
58 $(MFSTINSTALL
) := FILEMODE
= 0444
60 REAL_COMMON
= debug_alloc.o
61 COMMON
= ns_generic.o ns_files.o ns_nis.o \
62 ns_ldap.o auto_mnttab.o auto_subr.o
$(REAL_COMMON
)
64 AUTOOBJS
= automount.o
$(COMMON
) $(FSLIB
) smfcfg.o
66 MOUNTOBJS
= mount.o
$(FSLIB
) $(REAL_COMMON
)
69 autod_parse.o autod_mount.o autod_nfs.o nfs_cast.o \
70 autod_autofs.o autod_xdr.o autod_readdir.o autod_lookup.o \
73 TYPEOBJS
= $(LOCAL
) $(COMMON
) replica.o nfs_sec.o nfs_resolve.o nfs_subr.o \
74 $(FSLIB
) webnfs_xdr.o webnfs_client.o selfcheck.o
76 SHAREOBJS
= $(SHARESRCS
:%.c
=%.o
)
78 UNSHAREOBJS
= $(UNSHARESRCS
:%.c
=%.o
)
84 $(AUTO
) := LDLIBS
+= -lnsl
-lsldap
-lscf
85 $(MOUNT
):= LDLIBS
+= -lscf
86 $(TYPEPROG
) := LDLIBS
+= -lrpcsvc
-lsocket
-lnsl
-lsldap
-lkstat
-lscf
88 CFLAGS
+= $(CCVERBOSE
) -D_FILE_OFFSET_BITS
=64
89 CPPFLAGS
= -I.
-I..
-I..
/nfs
/lib
$(CPPFLAGS.master
) -D_REENTRANT \
92 CERRWARN
+= -_gcc
=-Wno-parentheses
93 CERRWARN
+= -_gcc
=-Wno-unused-variable
94 CERRWARN
+= -_gcc
=-Wno-switch
95 CERRWARN
+= -_gcc
=-Wno-uninitialized
96 CERRWARN
+= -_gcc
=-Wno-unused-label
97 CERRWARN
+= -_gcc
=-Wno-unused-function
99 OBJS
= $(AUTOOBJS
) $(MOUNTOBJS
) $(TYPEOBJS
) \
100 $(SHAREOBJS
) $(UNSHAREOBJS
)
102 AUTOSRCS
= automount.c
$(COMMON
:%.o
=%.c
) $(FSLIBSRC
)
103 MOUNTSRCS
= mount.c
$(FSLIBSRC
)
104 TYPESRCS
= $(LOCAL
:%.o
=%.c
) $(COMMON
:%.o
=%.c
) \
105 ..
/nfs
/lib
/replica.c ..
/nfs
/lib
/nfs_sec.c \
106 ..
/nfs
/lib
/nfs_subr.c
$(FSLIBSRC
) ..
/nfs
/lib
/selfcheck.c \
107 ..
/nfs
/lib
/nfs_resolve.c ..
/nfs
/lib
/smfcfg.c
108 SHARESRCS
= $(SHARE
:%=%.c
)
109 UNSHARESRCS
= $(UNSHARE
:%=%.c
)
110 DFSHARESSRCS
= $(DFSHARES
:%=%.sh
)
111 SRCS
= $(OBJS
:%.o
=%.c
)
113 nfs_sec.o
:= CPPFLAGS
+= -DWNFS_SEC_NEGO
116 $(LINK.c
) -o
$@
$(AUTOOBJS
) $(LDLIBS
)
119 $(MOUNT
): $(MOUNTOBJS
)
120 $(LINK.c
) -o
$@
$(MOUNTOBJS
) $(LDLIBS
)
123 $(TYPEPROG
): webnfs.h
$(TYPEOBJS
)
124 $(LINK.c
) -o
$@
$(TYPEOBJS
) $(LDLIBS
)
127 $(SHARE
): $(SHAREOBJS
)
128 $(LINK.c
) -o
$@
$(SHAREOBJS
)
131 $(UNSHARE
): $(UNSHAREOBJS
)
132 $(LINK.c
) -o
$@
$(UNSHAREOBJS
)
135 $(ROOTSVCSYSTEM
)/filesystem
/%: %
138 DUMP_PROG
=malloc_dump
140 DUMP_PROTO
=$(BUILDDIR
)/$(DUMP_PROG
)_client
141 XFILE
=$(BUILDDIR
)/malloc_dump.x
142 XLINE
= "program DUMP { version VERS \
143 { void DUMP_IT(void) = 1000000; } = 2; } = 100099;"
145 $(XFILE
): $(BUILDDIR
)
147 echo
$(XLINE
) > $(XFILE
)
153 $(DUMP_PROTO
): $(BUILDDIR
) $(XFILE
)
154 cd
$(BUILDDIR
); $(RM
) *.
[ch
] makefile.malloc_dump
; rpcgen
-a
`basename $(XFILE)
155 cd $(BUILDDIR); $(MAKE) -f makefile.malloc_dump `basename $@
`
157 $(DUMP_PROG): $(DUMP_PROTO)
164 $(ROOTUSRSBIN)/$(AUTO):
165 $(RM) $@; $(SYMLINK) $(LINKVALUE) $@
167 replica.o: ../nfs/lib/replica.c
168 $(COMPILE.c) ../nfs/lib/replica.c
170 nfs_sec.o: ../nfs/lib/nfs_sec.c
171 $(COMPILE.c) ../nfs/lib/nfs_sec.c
173 nfs_subr.o: ../nfs/lib/nfs_subr.c
174 $(COMPILE.c) ../nfs/lib/nfs_subr.c
176 selfcheck.o: ../nfs/lib/selfcheck.c
177 $(COMPILE.c) ../nfs/lib/selfcheck.c
179 smfcfg.o: ../nfs/lib/smfcfg.c
180 $(COMPILE.c) ../nfs/lib/smfcfg.c
182 nfs_resolve.o: ../nfs/lib/nfs_resolve.c
183 $(COMPILE.c) ../nfs/lib/nfs_resolve.c
185 webnfs_xdr.c: webnfs.x
186 $(RPCGEN) -M -C -c -o $@ webnfs.x
188 webnfs_client.c: webnfs.x
189 $(RPCGEN) -M -C -l -o $@ webnfs.x
192 $(RPCGEN) -M -C -h -o $@ webnfs.x
194 webnfs.x: ../nfs/lib/webnfs.x
196 cp ../nfs/lib/webnfs.x .
202 $(SED) -e 's/pr_msg/gettext/' `$(GREP
) -l
"pr_msg|gettext" *.
[ch
]` | \
203 $(XGETTEXT) $(XGETFLAGS) -
204 $(SED) -e '/^# msg/d' -e '/^domain/d' < messages.po > $@
208 $(LINT.c) $(AUTOSRCS)
209 $(LINT.c) $(MOUNTSRCS)
210 $(LINT.c) $(TYPESRCS)
213 $(RM) $(OBJS) webnfs_xdr.c webnfs_client.c webnfs.h webnfs.x
215 check: $(CHKMANIFEST)