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 539d3e169Sevanl# Common Development and Distribution License (the "License"). 639d3e169Sevanl# 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# 21d50bcaaeSAndrew Stormont 227c478bd9Sstevel@tonic-gate# 23d50bcaaeSAndrew Stormont# Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved. 24d50bcaaeSAndrew Stormont# Copyright 2015 RackTop Systems. 255661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc. 26d50bcaaeSAndrew Stormont# 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gateFSTYPE= autofs 297c478bd9Sstevel@tonic-gateAUTO= automount 307c478bd9Sstevel@tonic-gateMOUNT= mount 317c478bd9Sstevel@tonic-gateVERS= .2 327c478bd9Sstevel@tonic-gateDFSHARES= dfshares 337c478bd9Sstevel@tonic-gateSHARE= share 347c478bd9Sstevel@tonic-gateUNSHARE= unshare 357c478bd9Sstevel@tonic-gateLIBPROG= $(AUTO) $(MOUNT) $(DFSHARES) $(SHARE) $(UNSHARE) 367c478bd9Sstevel@tonic-gateTYPEPROG= automountd 377c478bd9Sstevel@tonic-gate 387c478bd9Sstevel@tonic-gateLINKINSTALL= $(ROOTUSRSBIN)/$(AUTO) 397c478bd9Sstevel@tonic-gateLINKVALUE= ../lib/fs/$(FSTYPE)/$(AUTO) 407c478bd9Sstevel@tonic-gateMAPS= auto_master auto_home 417c478bd9Sstevel@tonic-gateMAPINSTALL= $(MAPS:%=$(ROOTETC)/%) 427c478bd9Sstevel@tonic-gateAUTOFS= autofs 43a7872406SmeemDEFAULTFILES= autofs.dfl 447c478bd9Sstevel@tonic-gateSMFMANIFEST= autofs.xml 457c478bd9Sstevel@tonic-gateSMFMETHOD= svc-autofs 467c478bd9Sstevel@tonic-gateMFSTINSTALL= $(SMFMANIFEST:%=$(ROOTSVCSYSTEM)/filesystem/%) 477c478bd9Sstevel@tonic-gateMETHODINSTALL= $(SMFMETHOD:%=$(ROOTLIBSVCMETHOD)/%) 487c478bd9Sstevel@tonic-gate 49a7872406SmeemOTHERINSTALL= $(MAPINSTALL) $(LINKINSTALL) $(ROOTETCDEFAULTFILES) \ 507c478bd9Sstevel@tonic-gate $(MFSTINSTALL) $(METHODINSTALL) 517c478bd9Sstevel@tonic-gate 527c478bd9Sstevel@tonic-gateUNCHECKED_HDRS= webnfs.h 537c478bd9Sstevel@tonic-gate 547c478bd9Sstevel@tonic-gateMANIFEST= autofs.xml 557c478bd9Sstevel@tonic-gateSVCMETHOD= svc-autofs 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gateinclude ../Makefile.fstype 587c478bd9Sstevel@tonic-gate 597c478bd9Sstevel@tonic-gate$(MAPINSTALL) := FILEMODE= 0644 607c478bd9Sstevel@tonic-gate 617c478bd9Sstevel@tonic-gate$(MFSTINSTALL) := FILEMODE = 0444 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gateREAL_COMMON= debug_alloc.o 6436e852a1SRaja AndraCOMMON= ns_generic.o ns_files.o ns_nis.o \ 657c478bd9Sstevel@tonic-gate ns_ldap.o auto_mnttab.o auto_subr.o $(REAL_COMMON) 667c478bd9Sstevel@tonic-gate 67dd51520eSPavan Mettu - Oracle Corporation - Menlo Park United StatesAUTOOBJS= automount.o $(COMMON) $(FSLIB) smfcfg.o 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gateMOUNTOBJS= mount.o $(FSLIB) $(REAL_COMMON) 707c478bd9Sstevel@tonic-gate 7139d3e169SevanlLOCAL= autod_main.o \ 727c478bd9Sstevel@tonic-gate autod_parse.o autod_mount.o autod_nfs.o nfs_cast.o \ 73dd51520eSPavan Mettu - Oracle Corporation - Menlo Park United States autod_autofs.o autod_xdr.o autod_readdir.o autod_lookup.o \ 74dd51520eSPavan Mettu - Oracle Corporation - Menlo Park United States smfcfg.o 757c478bd9Sstevel@tonic-gate 762f172c55SRobert ThurlowTYPEOBJS= $(LOCAL) $(COMMON) replica.o nfs_sec.o nfs_resolve.o nfs_subr.o \ 772f172c55SRobert Thurlow $(FSLIB) webnfs_xdr.o webnfs_client.o selfcheck.o 787c478bd9Sstevel@tonic-gate 79*33efde42SToomas SoomeSHAREOBJS= $(SHARE:%=%.o) 807c478bd9Sstevel@tonic-gate 81*33efde42SToomas SoomeUNSHAREOBJS= $(UNSHARE:%=%.o) 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gatePOFILE= autofs.po 847c478bd9Sstevel@tonic-gate 85b56bf881SAntonello Cruz$(AUTO) := LDLIBS += -lnsl -lsldap -lscf 86b56bf881SAntonello Cruz$(MOUNT):= LDLIBS += -lscf 87b56bf881SAntonello Cruz$(TYPEPROG) := LDLIBS += -lrpcsvc -lsocket -lnsl -lsldap -lkstat -lscf 887c478bd9Sstevel@tonic-gate 89a5f20e89SToomas SoomeCSTD= $(CSTD_GNU99) 90a5f20e89SToomas Soome 9111606941SjwahligCFLAGS += $(CCVERBOSE) -D_FILE_OFFSET_BITS=64 927c478bd9Sstevel@tonic-gateCPPFLAGS= -I. -I.. -I../nfs/lib $(CPPFLAGS.master) -D_REENTRANT \ 937c478bd9Sstevel@tonic-gate $(MALLOC_DEBUG) 947014882cSRichard Lowe 957014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 967014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable 977014882cSRichard LoweCERRWARN += -_gcc=-Wno-switch 98d3b5f563SJohn LevonCERRWARN += $(CNOWARN_UNINIT) 997014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-function 1007014882cSRichard Lowe 1015661bb76SJohn Levon# not linted 1025661bb76SJohn LevonSMATCH=off 1035661bb76SJohn Levon 1047c478bd9Sstevel@tonic-gateOBJS= $(AUTOOBJS) $(MOUNTOBJS) $(TYPEOBJS) \ 1057c478bd9Sstevel@tonic-gate $(SHAREOBJS) $(UNSHAREOBJS) 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gatenfs_sec.o := CPPFLAGS += -DWNFS_SEC_NEGO 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gate$(AUTO): $(AUTOOBJS) 1107c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ $(AUTOOBJS) $(LDLIBS) 1117c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1127c478bd9Sstevel@tonic-gate 1137c478bd9Sstevel@tonic-gate$(MOUNT): $(MOUNTOBJS) 1147c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ $(MOUNTOBJS) $(LDLIBS) 1157c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1167c478bd9Sstevel@tonic-gate 1177c478bd9Sstevel@tonic-gate$(TYPEPROG): webnfs.h $(TYPEOBJS) 1187c478bd9Sstevel@tonic-gate $(LINK.c) -o $@ $(TYPEOBJS) $(LDLIBS) 1197c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1207c478bd9Sstevel@tonic-gate 1217c478bd9Sstevel@tonic-gate$(SHARE): $(SHAREOBJS) 122d50bcaaeSAndrew Stormont $(LINK.c) -o $@ $(SHAREOBJS) $(LDLIBS) 1237c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1247c478bd9Sstevel@tonic-gate 1257c478bd9Sstevel@tonic-gate$(UNSHARE): $(UNSHAREOBJS) 126d50bcaaeSAndrew Stormont $(LINK.c) -o $@ $(UNSHAREOBJS) $(LDLIBS) 1277c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1287c478bd9Sstevel@tonic-gate 1297c478bd9Sstevel@tonic-gate$(ROOTSVCSYSTEM)/filesystem/%: % 1307c478bd9Sstevel@tonic-gate $(INS.file) 1317c478bd9Sstevel@tonic-gate 1327c478bd9Sstevel@tonic-gateDUMP_PROG=malloc_dump 1337c478bd9Sstevel@tonic-gateBUILDDIR=tmp 1347c478bd9Sstevel@tonic-gateDUMP_PROTO=$(BUILDDIR)/$(DUMP_PROG)_client 1357c478bd9Sstevel@tonic-gateXFILE=$(BUILDDIR)/malloc_dump.x 1367c478bd9Sstevel@tonic-gateXLINE= "program DUMP { version VERS \ 1377c478bd9Sstevel@tonic-gate { void DUMP_IT(void) = 1000000; } = 2; } = 100099;" 1387c478bd9Sstevel@tonic-gate 1397c478bd9Sstevel@tonic-gate$(XFILE): $(BUILDDIR) 1407c478bd9Sstevel@tonic-gate $(RM) $(XFILE) 14102b17e23SRichard Lowe $(ECHO) $(XLINE) > $(XFILE) 1427c478bd9Sstevel@tonic-gate 1437c478bd9Sstevel@tonic-gate$(BUILDDIR): 1447c478bd9Sstevel@tonic-gate $(RM) -r $(BUILDDIR) 14502b17e23SRichard Lowe $(MKDIR) $(BUILDDIR) 1467c478bd9Sstevel@tonic-gate 1477c478bd9Sstevel@tonic-gate$(DUMP_PROTO): $(BUILDDIR) $(XFILE) 1487c478bd9Sstevel@tonic-gate cd $(BUILDDIR); $(RM) *.[ch] makefile.malloc_dump ; rpcgen -a `basename $(XFILE) 1497c478bd9Sstevel@tonic-gate cd $(BUILDDIR); $(MAKE) -f makefile.malloc_dump `basename $@` 1507c478bd9Sstevel@tonic-gate 1517c478bd9Sstevel@tonic-gate$(DUMP_PROG): $(DUMP_PROTO) 1527c478bd9Sstevel@tonic-gate $(RM) $@ 15302b17e23SRichard Lowe $(CP) $(DUMP_PROTO) $@ 1547c478bd9Sstevel@tonic-gate 1557c478bd9Sstevel@tonic-gateclean_dump: 1567c478bd9Sstevel@tonic-gate $(RM) -r $(BUILDDIR) 1577c478bd9Sstevel@tonic-gate $(RM) $(DUMP_PROG) 1587c478bd9Sstevel@tonic-gate$(ROOTUSRSBIN)/$(AUTO): 1597c478bd9Sstevel@tonic-gate $(RM) $@; $(SYMLINK) $(LINKVALUE) $@ 1607c478bd9Sstevel@tonic-gate 1617c478bd9Sstevel@tonic-gatereplica.o: ../nfs/lib/replica.c 1627c478bd9Sstevel@tonic-gate $(COMPILE.c) ../nfs/lib/replica.c 1637c478bd9Sstevel@tonic-gate 1647c478bd9Sstevel@tonic-gatenfs_sec.o: ../nfs/lib/nfs_sec.c 1657c478bd9Sstevel@tonic-gate $(COMPILE.c) ../nfs/lib/nfs_sec.c 1667c478bd9Sstevel@tonic-gate 1677c478bd9Sstevel@tonic-gatenfs_subr.o: ../nfs/lib/nfs_subr.c 1687c478bd9Sstevel@tonic-gate $(COMPILE.c) ../nfs/lib/nfs_subr.c 1697c478bd9Sstevel@tonic-gate 1707c478bd9Sstevel@tonic-gateselfcheck.o: ../nfs/lib/selfcheck.c 1717c478bd9Sstevel@tonic-gate $(COMPILE.c) ../nfs/lib/selfcheck.c 1727c478bd9Sstevel@tonic-gate 173dd51520eSPavan Mettu - Oracle Corporation - Menlo Park United Statessmfcfg.o: ../nfs/lib/smfcfg.c 174dd51520eSPavan Mettu - Oracle Corporation - Menlo Park United States $(COMPILE.c) ../nfs/lib/smfcfg.c 175dd51520eSPavan Mettu - Oracle Corporation - Menlo Park United States 1762f172c55SRobert Thurlownfs_resolve.o: ../nfs/lib/nfs_resolve.c 1772f172c55SRobert Thurlow $(COMPILE.c) ../nfs/lib/nfs_resolve.c 1787c478bd9Sstevel@tonic-gate 1797c478bd9Sstevel@tonic-gatewebnfs_xdr.c: webnfs.x 180bfa62c28SVallish Vaidyeshwara $(RPCGEN) -M -C -c -o $@ webnfs.x 1817c478bd9Sstevel@tonic-gate 1827c478bd9Sstevel@tonic-gatewebnfs_client.c: webnfs.x 183bfa62c28SVallish Vaidyeshwara $(RPCGEN) -M -C -l -o $@ webnfs.x 1847c478bd9Sstevel@tonic-gate 1857c478bd9Sstevel@tonic-gatewebnfs.h: webnfs.x 186bfa62c28SVallish Vaidyeshwara $(RPCGEN) -M -C -h -o $@ webnfs.x 1877c478bd9Sstevel@tonic-gate 1887c478bd9Sstevel@tonic-gatewebnfs.x: ../nfs/lib/webnfs.x 1897c478bd9Sstevel@tonic-gate $(RM) webnfs.x 19002b17e23SRichard Lowe $(CP) ../nfs/lib/webnfs.x . 1917c478bd9Sstevel@tonic-gate 1927c478bd9Sstevel@tonic-gatecatalog: $(POFILE) 1937c478bd9Sstevel@tonic-gate 1947c478bd9Sstevel@tonic-gate$(POFILE): 1957c478bd9Sstevel@tonic-gate $(RM) messages.po 19602b17e23SRichard Lowe $(SED) -e 's/pr_msg/gettext/' `$(EGREP) -l "pr_msg|gettext" *.[ch]` | \ 1977c478bd9Sstevel@tonic-gate $(XGETTEXT) $(XGETFLAGS) - 1987c478bd9Sstevel@tonic-gate $(SED) -e '/^# msg/d' -e '/^domain/d' < messages.po > $@ 1997c478bd9Sstevel@tonic-gate $(RM) messages.po 2007c478bd9Sstevel@tonic-gate 2017c478bd9Sstevel@tonic-gateclean: clean_dump 2027c478bd9Sstevel@tonic-gate $(RM) $(OBJS) webnfs_xdr.c webnfs_client.c webnfs.h webnfs.x 2037c478bd9Sstevel@tonic-gate 2047c478bd9Sstevel@tonic-gatecheck: $(CHKMANIFEST) 205