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]
23 # Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright 2015 RackTop Systems.
34 LIBPROG
= $(AUTO
) $(MOUNT
) $(DFSHARES
) $(SHARE
) $(UNSHARE
)
37 LINKINSTALL
= $(ROOTUSRSBIN
)/$(AUTO
)
38 LINKVALUE
= ..
/lib
/fs
/$(FSTYPE
)/$(AUTO
)
39 MAPS
= auto_master auto_home
40 MAPINSTALL
= $(MAPS
:%=$(ROOTETC
)/%)
42 DEFAULTFILES
= autofs.dfl
43 SMFMANIFEST
= autofs.xml
45 MFSTINSTALL
= $(SMFMANIFEST
:%=$(ROOTSVCSYSTEM
)/filesystem
/%)
46 METHODINSTALL
= $(SMFMETHOD
:%=$(ROOTLIBSVCMETHOD
)/%)
48 OTHERINSTALL
= $(MAPINSTALL
) $(LINKINSTALL
) $(ROOTETCDEFAULTFILES
) \
49 $(MFSTINSTALL
) $(METHODINSTALL
)
51 UNCHECKED_HDRS
= webnfs.h
56 include ..
/Makefile.fstype
58 $(MAPINSTALL
) := FILEMODE
= 0644
60 $(MFSTINSTALL
) := FILEMODE
= 0444
62 REAL_COMMON
= debug_alloc.o
63 COMMON
= ns_generic.o ns_files.o ns_nis.o \
64 ns_ldap.o auto_mnttab.o auto_subr.o
$(REAL_COMMON
)
66 AUTOOBJS
= automount.o
$(COMMON
) $(FSLIB
) smfcfg.o
68 MOUNTOBJS
= mount.o
$(FSLIB
) $(REAL_COMMON
)
71 autod_parse.o autod_mount.o autod_nfs.o nfs_cast.o \
72 autod_autofs.o autod_xdr.o autod_readdir.o autod_lookup.o \
75 TYPEOBJS
= $(LOCAL
) $(COMMON
) replica.o nfs_sec.o nfs_resolve.o nfs_subr.o \
76 $(FSLIB
) webnfs_xdr.o webnfs_client.o selfcheck.o
78 SHAREOBJS
= $(SHARESRCS
:%.c
=%.o
)
80 UNSHAREOBJS
= $(UNSHARESRCS
:%.c
=%.o
)
86 $(AUTO
) := LDLIBS
+= -lnsl
-lsldap
-lscf
87 $(MOUNT
):= LDLIBS
+= -lscf
88 $(TYPEPROG
) := LDLIBS
+= -lrpcsvc
-lsocket
-lnsl
-lsldap
-lkstat
-lscf
90 CFLAGS
+= $(CCVERBOSE
) -D_FILE_OFFSET_BITS
=64
91 CPPFLAGS
= -I.
-I..
-I..
/nfs
/lib
$(CPPFLAGS.master
) -D_REENTRANT \
94 CERRWARN
+= -_gcc
=-Wno-parentheses
95 CERRWARN
+= -_gcc
=-Wno-unused-variable
96 CERRWARN
+= -_gcc
=-Wno-switch
97 CERRWARN
+= -_gcc
=-Wno-uninitialized
98 CERRWARN
+= -_gcc
=-Wno-unused-label
99 CERRWARN
+= -_gcc
=-Wno-unused-function
101 OBJS
= $(AUTOOBJS
) $(MOUNTOBJS
) $(TYPEOBJS
) \
102 $(SHAREOBJS
) $(UNSHAREOBJS
)
104 AUTOSRCS
= automount.c
$(COMMON
:%.o
=%.c
) $(FSLIBSRC
)
105 MOUNTSRCS
= mount.c
$(FSLIBSRC
)
106 TYPESRCS
= $(LOCAL
:%.o
=%.c
) $(COMMON
:%.o
=%.c
) \
107 ..
/nfs
/lib
/replica.c ..
/nfs
/lib
/nfs_sec.c \
108 ..
/nfs
/lib
/nfs_subr.c
$(FSLIBSRC
) ..
/nfs
/lib
/selfcheck.c \
109 ..
/nfs
/lib
/nfs_resolve.c ..
/nfs
/lib
/smfcfg.c
110 SHARESRCS
= $(SHARE
:%=%.c
)
111 UNSHARESRCS
= $(UNSHARE
:%=%.c
)
112 DFSHARESSRCS
= $(DFSHARES
:%=%.sh
)
113 SRCS
= $(OBJS
:%.o
=%.c
)
115 nfs_sec.o
:= CPPFLAGS
+= -DWNFS_SEC_NEGO
118 $(LINK.c
) -o
$@
$(AUTOOBJS
) $(LDLIBS
)
121 $(MOUNT
): $(MOUNTOBJS
)
122 $(LINK.c
) -o
$@
$(MOUNTOBJS
) $(LDLIBS
)
125 $(TYPEPROG
): webnfs.h
$(TYPEOBJS
)
126 $(LINK.c
) -o
$@
$(TYPEOBJS
) $(LDLIBS
)
129 $(SHARE
): $(SHAREOBJS
)
130 $(LINK.c
) -o
$@
$(SHAREOBJS
) $(LDLIBS
)
133 $(UNSHARE
): $(UNSHAREOBJS
)
134 $(LINK.c
) -o
$@
$(UNSHAREOBJS
) $(LDLIBS
)
137 $(ROOTSVCSYSTEM
)/filesystem
/%: %
140 DUMP_PROG
=malloc_dump
142 DUMP_PROTO
=$(BUILDDIR
)/$(DUMP_PROG
)_client
143 XFILE
=$(BUILDDIR
)/malloc_dump.x
144 XLINE
= "program DUMP { version VERS \
145 { void DUMP_IT(void) = 1000000; } = 2; } = 100099;"
147 $(XFILE
): $(BUILDDIR
)
149 echo
$(XLINE
) > $(XFILE
)
155 $(DUMP_PROTO
): $(BUILDDIR
) $(XFILE
)
156 cd
$(BUILDDIR
); $(RM
) *.
[ch
] makefile.malloc_dump
; rpcgen
-a
`basename $(XFILE)
157 cd $(BUILDDIR); $(MAKE) -f makefile.malloc_dump `basename $@
`
159 $(DUMP_PROG): $(DUMP_PROTO)
166 $(ROOTUSRSBIN)/$(AUTO):
167 $(RM) $@; $(SYMLINK) $(LINKVALUE) $@
169 replica.o: ../nfs/lib/replica.c
170 $(COMPILE.c) ../nfs/lib/replica.c
172 nfs_sec.o: ../nfs/lib/nfs_sec.c
173 $(COMPILE.c) ../nfs/lib/nfs_sec.c
175 nfs_subr.o: ../nfs/lib/nfs_subr.c
176 $(COMPILE.c) ../nfs/lib/nfs_subr.c
178 selfcheck.o: ../nfs/lib/selfcheck.c
179 $(COMPILE.c) ../nfs/lib/selfcheck.c
181 smfcfg.o: ../nfs/lib/smfcfg.c
182 $(COMPILE.c) ../nfs/lib/smfcfg.c
184 nfs_resolve.o: ../nfs/lib/nfs_resolve.c
185 $(COMPILE.c) ../nfs/lib/nfs_resolve.c
187 webnfs_xdr.c: webnfs.x
188 $(RPCGEN) -M -C -c -o $@ webnfs.x
190 webnfs_client.c: webnfs.x
191 $(RPCGEN) -M -C -l -o $@ webnfs.x
194 $(RPCGEN) -M -C -h -o $@ webnfs.x
196 webnfs.x: ../nfs/lib/webnfs.x
198 cp ../nfs/lib/webnfs.x .
204 $(SED) -e 's/pr_msg/gettext/' `$(GREP
) -l
"pr_msg|gettext" *.
[ch
]` | \
205 $(XGETTEXT) $(XGETFLAGS) -
206 $(SED) -e '/^# msg/d' -e '/^domain/d' < messages.po > $@
210 $(LINT.c) $(AUTOSRCS)
211 $(LINT.c) $(MOUNTSRCS)
212 $(LINT.c) $(TYPESRCS)
215 $(RM) $(OBJS) webnfs_xdr.c webnfs_client.c webnfs.h webnfs.x
217 check: $(CHKMANIFEST)