17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5*39d3e169Sevanl# Common Development and Distribution License (the "License"). 6*39d3e169Sevanl# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 217c478bd9Sstevel@tonic-gate# 22*39d3e169Sevanl# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 267c478bd9Sstevel@tonic-gate# 277c478bd9Sstevel@tonic-gate# cmd/fs.d/autofs/Makefile 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gateFSTYPE= autofs 307c478bd9Sstevel@tonic-gateAUTO= automount 317c478bd9Sstevel@tonic-gateMOUNT= mount 327c478bd9Sstevel@tonic-gateVERS= .2 337c478bd9Sstevel@tonic-gateDFSHARES= dfshares 347c478bd9Sstevel@tonic-gateSHARE= share 357c478bd9Sstevel@tonic-gateUNSHARE= unshare 367c478bd9Sstevel@tonic-gateLIBPROG= $(AUTO) $(MOUNT) $(DFSHARES) $(SHARE) $(UNSHARE) 377c478bd9Sstevel@tonic-gateTYPEPROG= automountd 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gateLINKINSTALL= $(ROOTUSRSBIN)/$(AUTO) 407c478bd9Sstevel@tonic-gateLINKVALUE= ../lib/fs/$(FSTYPE)/$(AUTO) 417c478bd9Sstevel@tonic-gateMAPS= auto_master auto_home 427c478bd9Sstevel@tonic-gateMAPINSTALL= $(MAPS:%=$(ROOTETC)/%) 437c478bd9Sstevel@tonic-gateAUTOFS= autofs 44a7872406SmeemDEFAULTFILES= autofs.dfl 457c478bd9Sstevel@tonic-gateSMFMANIFEST= autofs.xml 467c478bd9Sstevel@tonic-gateSMFMETHOD= svc-autofs 477c478bd9Sstevel@tonic-gateMFSTINSTALL= $(SMFMANIFEST:%=$(ROOTSVCSYSTEM)/filesystem/%) 487c478bd9Sstevel@tonic-gateMETHODINSTALL= $(SMFMETHOD:%=$(ROOTLIBSVCMETHOD)/%) 497c478bd9Sstevel@tonic-gate 50a7872406SmeemOTHERINSTALL= $(MAPINSTALL) $(LINKINSTALL) $(ROOTETCDEFAULTFILES) \ 517c478bd9Sstevel@tonic-gate $(MFSTINSTALL) $(METHODINSTALL) 527c478bd9Sstevel@tonic-gate 537c478bd9Sstevel@tonic-gateUNCHECKED_HDRS= webnfs.h 547c478bd9Sstevel@tonic-gate 557c478bd9Sstevel@tonic-gateMANIFEST= autofs.xml 567c478bd9Sstevel@tonic-gateSVCMETHOD= svc-autofs 577c478bd9Sstevel@tonic-gate 587c478bd9Sstevel@tonic-gateinclude ../Makefile.fstype 597c478bd9Sstevel@tonic-gate 607c478bd9Sstevel@tonic-gate$(MAPINSTALL) := OWNER= root 617c478bd9Sstevel@tonic-gate$(MAPINSTALL) := FILEMODE= 0644 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gate$(MFSTINSTALL) := FILEMODE = 0444 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gateREAL_COMMON= debug_alloc.o 667c478bd9Sstevel@tonic-gateCOMMON= ns_generic.o ns_files.o ns_nisplus.o ns_nis.o \ 677c478bd9Sstevel@tonic-gate ns_ldap.o auto_mnttab.o auto_subr.o $(REAL_COMMON) 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gateAUTOOBJS= automount.o $(COMMON) $(FSLIB) 707c478bd9Sstevel@tonic-gate 717c478bd9Sstevel@tonic-gateMOUNTOBJS= mount.o $(FSLIB) $(REAL_COMMON) 727c478bd9Sstevel@tonic-gate 73*39d3e169SevanlLOCAL= autod_main.o \ 747c478bd9Sstevel@tonic-gate autod_parse.o autod_mount.o autod_nfs.o nfs_cast.o \ 757c478bd9Sstevel@tonic-gate autod_autofs.o autod_xdr.o autod_readdir.o autod_lookup.o 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gateTYPEOBJS= $(LOCAL) $(COMMON) replica.o nfs_sec.o nfs_subr.o $(FSLIB) \ 787c478bd9Sstevel@tonic-gate webnfs_xdr.o webnfs_client.o selfcheck.o 797c478bd9Sstevel@tonic-gate 807c478bd9Sstevel@tonic-gateSHAREOBJS= $(SHARESRCS:%.c=%.o) 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gateUNSHAREOBJS= $(UNSHARESRCS:%.c=%.o) 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gatePOFILE= autofs.po 857c478bd9Sstevel@tonic-gateGREP= egrep 867c478bd9Sstevel@tonic-gateSED= sed 877c478bd9Sstevel@tonic-gate 887c478bd9Sstevel@tonic-gate$(AUTO) := LDLIBS += -lnsl -lsldap -lcmd 897c478bd9Sstevel@tonic-gate$(MOUNT):= LDLIBS += -lnsl 907c478bd9Sstevel@tonic-gate$(TYPEPROG) := LDLIBS += -lrpcsvc -lsocket -lnsl -lsldap -lcmd \ 917c478bd9Sstevel@tonic-gate -lkstat 927c478bd9Sstevel@tonic-gate$(TYPEPROG) := LDFLAGS += -R/usr/lib/fs/$(FSTYPE) 937c478bd9Sstevel@tonic-gate 9411606941SjwahligCFLAGS += $(CCVERBOSE) -D_FILE_OFFSET_BITS=64 957c478bd9Sstevel@tonic-gateCPPFLAGS= -I. -I.. -I../nfs/lib $(CPPFLAGS.master) -D_REENTRANT \ 967c478bd9Sstevel@tonic-gate $(MALLOC_DEBUG) 977c478bd9Sstevel@tonic-gateOBJS= $(AUTOOBJS) $(MOUNTOBJS) $(TYPEOBJS) \ 987c478bd9Sstevel@tonic-gate $(SHAREOBJS) $(UNSHAREOBJS) 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gateAUTOSRCS= automount.c $(COMMON:%.o=%.c) $(FSLIBSRC) 1017c478bd9Sstevel@tonic-gateMOUNTSRCS= mount.c $(FSLIBSRC) 1027c478bd9Sstevel@tonic-gateTYPESRCS= $(LOCAL:%.o=%.c) $(COMMON:%.o=%.c) \ 1037c478bd9Sstevel@tonic-gate ../nfs/lib/replica.c ../nfs/lib/nfs_sec.c \ 1047c478bd9Sstevel@tonic-gate ../nfs/lib/nfs_subr.c $(FSLIBSRC) ../nfs/lib/selfcheck.c 1057c478bd9Sstevel@tonic-gateSHARESRCS= $(SHARE:%=%.c) 1067c478bd9Sstevel@tonic-gateUNSHARESRCS= $(UNSHARE:%=%.c) 1077c478bd9Sstevel@tonic-gateDFSHARESSRCS= $(DFSHARES:%=%.sh) 1087c478bd9Sstevel@tonic-gateSRCS= $(OBJS:%.o=%.c) 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gatenfs_sec.o := CPPFLAGS += -DWNFS_SEC_NEGO 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gate$(AUTO): $(AUTOOBJS) 1137c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ $(AUTOOBJS) $(LDLIBS) 1147c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1157c478bd9Sstevel@tonic-gate 1167c478bd9Sstevel@tonic-gate$(MOUNT): $(MOUNTOBJS) 1177c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ $(MOUNTOBJS) $(LDLIBS) 1187c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1197c478bd9Sstevel@tonic-gate 1207c478bd9Sstevel@tonic-gate$(TYPEPROG): webnfs.h $(TYPEOBJS) 1217c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ $(TYPEOBJS) $(LDLIBS) 1227c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1237c478bd9Sstevel@tonic-gate 1247c478bd9Sstevel@tonic-gate$(SHARE): $(SHAREOBJS) 1257c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ $(SHAREOBJS) 1267c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gate$(UNSHARE): $(UNSHAREOBJS) 1297c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ $(UNSHAREOBJS) 1307c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1317c478bd9Sstevel@tonic-gate 1327c478bd9Sstevel@tonic-gate$(ROOTSVCSYSTEM)/filesystem/%: % 1337c478bd9Sstevel@tonic-gate $(INS.file) 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gateDUMP_PROG=malloc_dump 1367c478bd9Sstevel@tonic-gateBUILDDIR=tmp 1377c478bd9Sstevel@tonic-gateDUMP_PROTO=$(BUILDDIR)/$(DUMP_PROG)_client 1387c478bd9Sstevel@tonic-gateXFILE=$(BUILDDIR)/malloc_dump.x 1397c478bd9Sstevel@tonic-gateXLINE= "program DUMP { version VERS \ 1407c478bd9Sstevel@tonic-gate { void DUMP_IT(void) = 1000000; } = 2; } = 100099;" 1417c478bd9Sstevel@tonic-gate 1427c478bd9Sstevel@tonic-gate$(XFILE): $(BUILDDIR) 1437c478bd9Sstevel@tonic-gate $(RM) $(XFILE) 1447c478bd9Sstevel@tonic-gate echo $(XLINE) > $(XFILE) 1457c478bd9Sstevel@tonic-gate 1467c478bd9Sstevel@tonic-gate$(BUILDDIR): 1477c478bd9Sstevel@tonic-gate $(RM) -r $(BUILDDIR) 1487c478bd9Sstevel@tonic-gate mkdir $(BUILDDIR) 1497c478bd9Sstevel@tonic-gate 1507c478bd9Sstevel@tonic-gate$(DUMP_PROTO): $(BUILDDIR) $(XFILE) 1517c478bd9Sstevel@tonic-gate cd $(BUILDDIR); $(RM) *.[ch] makefile.malloc_dump ; rpcgen -a `basename $(XFILE) 1527c478bd9Sstevel@tonic-gate cd $(BUILDDIR); $(MAKE) -f makefile.malloc_dump `basename $@` 1537c478bd9Sstevel@tonic-gate 1547c478bd9Sstevel@tonic-gate$(DUMP_PROG): $(DUMP_PROTO) 1557c478bd9Sstevel@tonic-gate $(RM) $@ 1567c478bd9Sstevel@tonic-gate cp $(DUMP_PROTO) $@ 1577c478bd9Sstevel@tonic-gate 1587c478bd9Sstevel@tonic-gateclean_dump: 1597c478bd9Sstevel@tonic-gate $(RM) -r $(BUILDDIR) 1607c478bd9Sstevel@tonic-gate $(RM) $(DUMP_PROG) 1617c478bd9Sstevel@tonic-gate$(ROOTUSRSBIN)/$(AUTO): 1627c478bd9Sstevel@tonic-gate $(RM) $@; $(SYMLINK) $(LINKVALUE) $@ 1637c478bd9Sstevel@tonic-gate 1647c478bd9Sstevel@tonic-gatereplica.o: ../nfs/lib/replica.c 1657c478bd9Sstevel@tonic-gate $(COMPILE.c) ../nfs/lib/replica.c 1667c478bd9Sstevel@tonic-gate 1677c478bd9Sstevel@tonic-gatenfs_sec.o: ../nfs/lib/nfs_sec.c 1687c478bd9Sstevel@tonic-gate $(COMPILE.c) ../nfs/lib/nfs_sec.c 1697c478bd9Sstevel@tonic-gate 1707c478bd9Sstevel@tonic-gatenfs_subr.o: ../nfs/lib/nfs_subr.c 1717c478bd9Sstevel@tonic-gate $(COMPILE.c) ../nfs/lib/nfs_subr.c 1727c478bd9Sstevel@tonic-gate 1737c478bd9Sstevel@tonic-gateselfcheck.o: ../nfs/lib/selfcheck.c 1747c478bd9Sstevel@tonic-gate $(COMPILE.c) ../nfs/lib/selfcheck.c 1757c478bd9Sstevel@tonic-gate 1767c478bd9Sstevel@tonic-gate 1777c478bd9Sstevel@tonic-gatewebnfs_xdr.c: webnfs.x 1787c478bd9Sstevel@tonic-gate $(RPCGEN) -C -c -o $@ webnfs.x 1797c478bd9Sstevel@tonic-gate 1807c478bd9Sstevel@tonic-gatewebnfs_client.c: webnfs.x 1817c478bd9Sstevel@tonic-gate $(RPCGEN) -C -l -o $@ webnfs.x 1827c478bd9Sstevel@tonic-gate 1837c478bd9Sstevel@tonic-gatewebnfs.h: webnfs.x 1847c478bd9Sstevel@tonic-gate $(RPCGEN) -C -h -o $@ webnfs.x 1857c478bd9Sstevel@tonic-gate 1867c478bd9Sstevel@tonic-gatewebnfs.x: ../nfs/lib/webnfs.x 1877c478bd9Sstevel@tonic-gate $(RM) webnfs.x 1887c478bd9Sstevel@tonic-gate cp ../nfs/lib/webnfs.x . 1897c478bd9Sstevel@tonic-gate 1907c478bd9Sstevel@tonic-gatecatalog: $(POFILE) 1917c478bd9Sstevel@tonic-gate 1927c478bd9Sstevel@tonic-gate$(POFILE): 1937c478bd9Sstevel@tonic-gate $(RM) messages.po 1947c478bd9Sstevel@tonic-gate $(SED) -e 's/pr_msg/gettext/' `$(GREP) -l "pr_msg|gettext" *.[ch]` | \ 1957c478bd9Sstevel@tonic-gate $(XGETTEXT) $(XGETFLAGS) - 1967c478bd9Sstevel@tonic-gate $(SED) -e '/^# msg/d' -e '/^domain/d' < messages.po > $@ 1977c478bd9Sstevel@tonic-gate $(RM) messages.po 1987c478bd9Sstevel@tonic-gate 1997c478bd9Sstevel@tonic-gatelint: 2007c478bd9Sstevel@tonic-gate $(LINT.c) $(AUTOSRCS) 2017c478bd9Sstevel@tonic-gate $(LINT.c) $(MOUNTSRCS) 2027c478bd9Sstevel@tonic-gate $(LINT.c) $(TYPESRCS) 2037c478bd9Sstevel@tonic-gate 2047c478bd9Sstevel@tonic-gateclean: clean_dump 2057c478bd9Sstevel@tonic-gate $(RM) $(OBJS) webnfs_xdr.c webnfs_client.c webnfs.h webnfs.x 2067c478bd9Sstevel@tonic-gate 2077c478bd9Sstevel@tonic-gatecheck: $(CHKMANIFEST) 208