xref: /titanic_44/usr/src/cmd/Makefile.cmd (revision 10d63b7db37a83b39c7f511cf9426c9d03ea0760)
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
51ae08745Sheppo# Common Development and Distribution License (the "License").
61ae08745Sheppo# 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#
22cc22b130SRich Burridge# Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
237c478bd9Sstevel@tonic-gate#
247c478bd9Sstevel@tonic-gate# Definitions common to command source.
257c478bd9Sstevel@tonic-gate#
267c478bd9Sstevel@tonic-gate# include global definitions; SRC should be defined in the shell.
277c478bd9Sstevel@tonic-gate# SRC is needed until RFE 1026993 is implemented.
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gateinclude $(SRC)/Makefile.master
307c478bd9Sstevel@tonic-gate
317c478bd9Sstevel@tonic-gateLN=		ln
327c478bd9Sstevel@tonic-gateSH=		sh
337c478bd9Sstevel@tonic-gateECHO=		echo
347c478bd9Sstevel@tonic-gateMKDIR=		mkdir
357c478bd9Sstevel@tonic-gateTOUCH=		touch
367c478bd9Sstevel@tonic-gate
377c478bd9Sstevel@tonic-gateFILEMODE=	0555
387c478bd9Sstevel@tonic-gateLIBFILEMODE=	0444
397c478bd9Sstevel@tonic-gateXPG4=		$(XPG4PROG:%=%.xpg4)
407c478bd9Sstevel@tonic-gateXPG6=		$(XPG6PROG:%=%.xpg6)
417c478bd9Sstevel@tonic-gate
427c478bd9Sstevel@tonic-gateKRB5DIR=	$(ROOT)/usr
437c478bd9Sstevel@tonic-gateKRB5BIN=	$(KRB5DIR)/bin
447c478bd9Sstevel@tonic-gateKRB5SBIN=	$(KRB5DIR)/sbin
457c478bd9Sstevel@tonic-gateKRB5LIB=	$(KRB5DIR)/lib/krb5
467c478bd9Sstevel@tonic-gateKRB5RUNPATH=	/usr/lib/krb5
477c478bd9Sstevel@tonic-gateGSSRUNPATH=	/usr/lib/gss
487c478bd9Sstevel@tonic-gate
497c478bd9Sstevel@tonic-gate
507c478bd9Sstevel@tonic-gateROOTBIN=		$(ROOT)/usr/bin
517c478bd9Sstevel@tonic-gateROOTLIB=		$(ROOT)/usr/lib
527c478bd9Sstevel@tonic-gateROOTLIBSVCBIN=		$(ROOT)/lib/svc/bin
537c478bd9Sstevel@tonic-gateROOTLIBSVCMETHOD=	$(ROOT)/lib/svc/method
5499ba4d70SRussell BlaineROOTLIBXEN=		$(ROOT)/usr/lib/xen/bin
55f875b4ebSricaROOTLIBZONES=		$(ROOT)/lib/zones
567c478bd9Sstevel@tonic-gate
577c478bd9Sstevel@tonic-gateROOTSHLIB=	$(ROOT)/usr/share/lib
585c51f124SMoriah WaterlandROOTPKGBIN=	$(ROOT)/usr/sadm/install/bin
595c51f124SMoriah WaterlandROOTCLASS_SCR_DIR= $(ROOT)/usr/sadm/install/scripts
605c51f124SMoriah WaterlandROOTADMIN_SRC_DIR= $(ROOT)/var/sadm/install/admin
615c51f124SMoriah Waterland
6267298654SdamicoROOTSHLIBCCS=	$(ROOTSHLIB)/ccs
637c478bd9Sstevel@tonic-gateROOTSBIN=	$(ROOT)/sbin
647c478bd9Sstevel@tonic-gateROOTUSRSBIN=	$(ROOT)/usr/sbin
657c478bd9Sstevel@tonic-gateROOTETC=	$(ROOT)/etc
66f875b4ebSrica
67f875b4ebSricaROOTETCSECURITY=	$(ROOTETC)/security
68f875b4ebSricaROOTETCTSOL=	$(ROOTETCSECURITY)/tsol
69f875b4ebSricaROOTETCSECLIB=	$(ROOTETCSECURITY)/lib
70f875b4ebSricaROOTETCZONES=	$(ROOTETC)/zones
71f875b4ebSrica
724e762ae7SAlexander PyhalovROOTETCFTPD=	$(ROOT)/etc/ftpd
73da14cebeSEric ChengROOTETCINET=	$(ROOT)/etc/inet
747c478bd9Sstevel@tonic-gateROOTCCSBIN=	$(ROOT)/usr/ccs/bin
7567298654SdamicoROOTCCSBIN64=	$(ROOTCCSBIN)/$(MACH64)
7667298654SdamicoROOTCCSBINLINKDIR=	$(ROOT)/../../bin
7767298654SdamicoROOTCCSBINLINKDIR64=	$(ROOT)../../../bin/$(MACH)
78*10d63b7dSRichard LoweROOTCCSLIB=	$(ROOT)/usr/ccs/lib
797c478bd9Sstevel@tonic-gateROOTUSRKVM=	$(ROOT)/usr/kvm
80ead1f93eSLiane PrazaROOTHAS=	$(ROOT)/usr/has
81ead1f93eSLiane PrazaROOTHASBIN=	$(ROOT)/usr/has/bin
82ead1f93eSLiane PrazaROOTHASLIB=	$(ROOT)/usr/has/lib
837c478bd9Sstevel@tonic-gateROOTXPG4=	$(ROOT)/usr/xpg4
847c478bd9Sstevel@tonic-gateROOTXPG4BIN=	$(ROOT)/usr/xpg4/bin
857c478bd9Sstevel@tonic-gateROOTXPG4BIN32=	$(ROOTXPG4BIN)/$(MACH32)
867c478bd9Sstevel@tonic-gateROOTXPG4BIN64=	$(ROOTXPG4BIN)/$(MACH64)
877c478bd9Sstevel@tonic-gateROOTXPG6=	$(ROOT)/usr/xpg6
887c478bd9Sstevel@tonic-gateROOTXPG6BIN=	$(ROOT)/usr/xpg6/bin
897c478bd9Sstevel@tonic-gateROOTLOCALEDEF=	$(ROOT)/usr/lib/localedef
907c478bd9Sstevel@tonic-gateROOTCHARMAP=	$(ROOTLOCALEDEF)/charmap
917c478bd9Sstevel@tonic-gateROOTI18NEXT=	$(ROOTLOCALEDEF)/extensions
927c478bd9Sstevel@tonic-gateROOTI18NEXT64=	$(ROOTLOCALEDEF)/extensions/$(MACH64)
937c478bd9Sstevel@tonic-gateROOTBIN32=	$(ROOTBIN)/$(MACH32)
947c478bd9Sstevel@tonic-gateROOTBIN64=	$(ROOTBIN)/$(MACH64)
957c478bd9Sstevel@tonic-gateROOTCMDDIR64=	$(ROOTCMDDIR)/$(MACH64)
967c478bd9Sstevel@tonic-gateROOTLIB64=	$(ROOTLIB)/$(MACH64)
977c478bd9Sstevel@tonic-gateROOTUSRSBIN32=	$(ROOTUSRSBIN)/$(MACH32)
987c478bd9Sstevel@tonic-gateROOTUSRSBIN64=	$(ROOTUSRSBIN)/$(MACH64)
99257873cfSJohn.Zolnowsky@Sun.COMROOTMAN=	$(ROOT)/usr/share/man
100257873cfSJohn.Zolnowsky@Sun.COMROOTMAN1=	$(ROOTMAN)/man1
101257873cfSJohn.Zolnowsky@Sun.COMROOTMAN1M=	$(ROOTMAN)/man1m
102257873cfSJohn.Zolnowsky@Sun.COMROOTMAN3=	$(ROOTMAN)/man3
103da6c28aaSamwROOTVARSMB=	$(ROOT)/var/smb
1047c478bd9Sstevel@tonic-gate
1057c478bd9Sstevel@tonic-gate
1065c51f124SMoriah Waterland#
1077c478bd9Sstevel@tonic-gate# Like ROOTLIBDIR in $(SRC)/Makefile.lib, any lower-level Makefiles that
1087c478bd9Sstevel@tonic-gate# put their binaries in a non-standard location should reset this and use
1097c478bd9Sstevel@tonic-gate# $(ROOTCMD) in their `install' target. By default we set this to a bogus
1107c478bd9Sstevel@tonic-gate# value so that it will not conflict with any of the other values already
1117c478bd9Sstevel@tonic-gate# defined in this Makefile.
1127c478bd9Sstevel@tonic-gate#
1137c478bd9Sstevel@tonic-gateROOTCMDDIR=	$(ROOT)/__nonexistent_directory__
1147c478bd9Sstevel@tonic-gate
1157c478bd9Sstevel@tonic-gateROOTSHAUDIO=	$(ROOT)/usr/share/audio
1167c478bd9Sstevel@tonic-gateROOTAUDIOSAMP=	$(ROOTSHAUDIO)/samples
1177c478bd9Sstevel@tonic-gateROOTAUDIOSAMPAU=$(ROOTAUDIOSAMP)/au
1187c478bd9Sstevel@tonic-gate
1197c478bd9Sstevel@tonic-gateISAEXEC=	$(ROOT)/usr/lib/isaexec
1207c478bd9Sstevel@tonic-gatePLATEXEC=	$(ROOT)/usr/lib/platexec
1217c478bd9Sstevel@tonic-gate
1227c478bd9Sstevel@tonic-gateLDLIBS =	$(LDLIBS.cmd)
1237c478bd9Sstevel@tonic-gate
1247c478bd9Sstevel@tonic-gateLDFLAGS.cmd = \
125f6acbf7cSrie	$(BDIRECT) $(ENVLDFLAGS1) $(ENVLDFLAGS2) $(ENVLDFLAGS3) \
12624da5b34Srie	$(MAPFILE.NES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%)
1277c478bd9Sstevel@tonic-gate
1287c478bd9Sstevel@tonic-gateLDFLAGS =	$(LDFLAGS.cmd)
1297c478bd9Sstevel@tonic-gate
1307c478bd9Sstevel@tonic-gateLINTFLAGS=	-axsm
1310bb07399SNick ToddLINTFLAGS64=	-axsm -m64
1327c478bd9Sstevel@tonic-gateLINTOUT=	lint.out
1337c478bd9Sstevel@tonic-gate
1347c478bd9Sstevel@tonic-gateKRB5PROG=	$(PROG:%=$(KRB5BIN)/%)
1357c478bd9Sstevel@tonic-gateKRB5SBINPROG=	$(PROG:%=$(KRB5SBIN)/%)
1367c478bd9Sstevel@tonic-gateKRB5LIBPROG=	$(PROG:%=$(KRB5LIB)/%)
1377c478bd9Sstevel@tonic-gate
1387c478bd9Sstevel@tonic-gateROOTPROG=	$(PROG:%=$(ROOTBIN)/%)
1397c478bd9Sstevel@tonic-gateROOTCMD=	$(PROG:%=$(ROOTCMDDIR)/%)
1407c478bd9Sstevel@tonic-gateROOTSHFILES=	$(SHFILES:%=$(ROOTBIN)/%)
1417c478bd9Sstevel@tonic-gateROOTLIBPROG=	$(PROG:%=$(ROOTLIB)/%)
1427c478bd9Sstevel@tonic-gateROOTLIBSHFILES= $(SHFILES:%=$(ROOTLIB)/%)
1437c478bd9Sstevel@tonic-gateROOTSHLIBPROG=	$(PROG:%=$(ROOTSHLIB)/%)
1447c478bd9Sstevel@tonic-gateROOTSBINPROG=	$(PROG:%=$(ROOTSBIN)/%)
1455c51f124SMoriah WaterlandROOTPKGBINPROG= $(PROG:%=$(ROOTPKGBIN)/%)
1465c51f124SMoriah WaterlandROOTCLASS_SCR_FILES= $(SCRIPTS:%=$(ROOTCLASS_SCR_DIR)/%)
1477c478bd9Sstevel@tonic-gateROOTUSRSBINPROG=$(PROG:%=$(ROOTUSRSBIN)/%)
148f875b4ebSricaROOTUSRSBINSCRIPT=$(SCRIPT:%=$(ROOTUSRSBIN)/%)
1497c478bd9Sstevel@tonic-gateROOTETCPROG=	$(PROG:%=$(ROOTETC)/%)
150ead1f93eSLiane PrazaROOTHASBINPROG= $(PROG:%=$(ROOTHASBIN)/%)
151ead1f93eSLiane PrazaROOTHASLIBPROG= $(PROG:%=$(ROOTHASLIB)/%)
1527c478bd9Sstevel@tonic-gateROOTCCSBINPROG=	$(PROG:%=$(ROOTCCSBIN)/%)
15367298654SdamicoROOTCCSBINPROG64=	  $(PROG:%=$(ROOTCCSBIN64)/%)
15467298654SdamicoROOTCCSBINLINK=$(PROG:%=  $(ROOTCCSBINLINKDIR)/%)
15567298654SdamicoROOTCCSBINLINK64=$(PROG:%=$(ROOTCCSBINLINKDIR64)/%)
1567c478bd9Sstevel@tonic-gateROOTUSRKVMPROG=	$(PROG:%=$(ROOTUSRKVM)/%)
1577c478bd9Sstevel@tonic-gateROOTXPG4PROG=	$(XPG4PROG:%=$(ROOTXPG4BIN)/%)
1587c478bd9Sstevel@tonic-gateROOTXPG4PROG32=	$(XPG4PROG:%=$(ROOTXPG4BIN32)/%)
1597c478bd9Sstevel@tonic-gateROOTXPG4PROG64=	$(XPG4PROG:%=$(ROOTXPG4BIN64)/%)
1607c478bd9Sstevel@tonic-gateROOTXPG6PROG=	$(XPG6PROG:%=$(ROOTXPG6BIN)/%)
1617c478bd9Sstevel@tonic-gateROOTLOCALEPROG=	$(PROG:%=$(ROOTLOCALEDEF)/%)
1627c478bd9Sstevel@tonic-gateROOTPROG64=	$(PROG:%=$(ROOTBIN64)/%)
1637c478bd9Sstevel@tonic-gateROOTPROG32=	$(PROG:%=$(ROOTBIN32)/%)
1647c478bd9Sstevel@tonic-gateROOTCMD64=	$(PROG:%=$(ROOTCMDDIR64)/%)
1657c478bd9Sstevel@tonic-gateROOTUSRSBINPROG32=	$(PROG:%=$(ROOTUSRSBIN32)/%)
1667c478bd9Sstevel@tonic-gateROOTUSRSBINPROG64=	$(PROG:%=$(ROOTUSRSBIN64)/%)
1677c478bd9Sstevel@tonic-gateROOTMAN1FILES=	$(MAN1FILES:%=$(ROOTMAN1)/%)
1687c478bd9Sstevel@tonic-gate$(ROOTMAN1FILES) := FILEMODE= 444
1697c478bd9Sstevel@tonic-gateROOTMAN1MFILES=	$(MAN1MFILES:%=$(ROOTMAN1M)/%)
1707c478bd9Sstevel@tonic-gate$(ROOTMAN1MFILES) := FILEMODE= 444
1717c478bd9Sstevel@tonic-gateROOTMAN3FILES=	$(MAN3FILES:%=$(ROOTMAN3)/%)
1727c478bd9Sstevel@tonic-gate$(ROOTMAN3FILES) := FILEMODE= 444
1737c478bd9Sstevel@tonic-gate
17467298654Sdamico# Symlink rules for /usr/ccs/bin commands. Note, those commands under
17567298654Sdamico# the rule of the linker area, are controlled by a different set of
17667298654Sdamico# rules defined in $(SRC)/cmd/sgs/Makefile.var.
17767298654Sdamico
17867298654SdamicoINS.ccsbinlink= \
17967298654Sdamico	$(RM) $(ROOTCCSBINPROG); \
18067298654Sdamico	$(SYMLINK) ../../bin/$(PROG) $(ROOTCCSBINPROG)
18167298654Sdamico
18267298654SdamicoINS.ccsbinlink64= \
18367298654Sdamico	$(RM) $(ROOTCCSBINPROG64); \
18467298654Sdamico	$(SYMLINK) ../../../bin/$(MACH64)/$(PROG) $(ROOTCCSBINPROG64)
18567298654Sdamico
1867c478bd9Sstevel@tonic-gateROOTETCDEFAULT=	$(ROOTETC)/default
187a7872406SmeemROOTETCDEFAULTFILES=	$(DEFAULTFILES:%.dfl=$(ROOTETCDEFAULT)/%)
188a7872406Smeem$(ROOTETCDEFAULTFILES) :=	FILEMODE = 0644
1897c478bd9Sstevel@tonic-gate
190f875b4ebSricaROOTETCSECFILES=	$(ETCSECFILES:%=$(ROOTETCSECURITY)/%)
191f875b4ebSrica$(ROOTETCSECFILES) :=	FILEMODE = 0644
192f875b4ebSrica
193f875b4ebSricaROOTETCTSOLFILES=	$(ETCTSOLFILES:%=$(ROOTETCTSOL)/%)
194f875b4ebSrica$(ROOTETCTSOLFILES) :=	FILEMODE = 0644
195f875b4ebSrica
196f875b4ebSricaROOTETCSECLIBFILES=	$(ETCSECLIBFILES:%=$(ROOTETCSECLIB)/%)
197f875b4ebSrica
198f875b4ebSricaROOTETCZONESFILES=	$(ETCZONESFILES:%=$(ROOTETCZONES)/%)
199f875b4ebSrica$(ROOTETCZONESFILES) :=	FILEMODE = 0444
200f875b4ebSrica
201f875b4ebSricaROOTLIBZONESFILES=	$(LIBZONESFILES:%=$(ROOTLIBZONES)/%)
202f875b4ebSrica$(ROOTLIBZONESFILES) :=	FILEMODE = 0555
203f875b4ebSrica
2045c51f124SMoriah WaterlandROOTADMIN_SRC_FILE= $(ADMINFILE:%=$(ROOTADMIN_SRC_DIR)/%)
2055c51f124SMoriah Waterland$(ROOTADMIN_SRC_FILE) := FILEMODE = 0444
206f875b4ebSrica
2077c478bd9Sstevel@tonic-gate#
2087c478bd9Sstevel@tonic-gate# Directories for smf(5) service manifests and profiles.
2097c478bd9Sstevel@tonic-gate#
2109444c26fSTom WhittenROOTSVC=			$(ROOT)/lib/svc
2119444c26fSTom WhittenROOTETCSVC=			$(ROOT)/etc/svc
2127c478bd9Sstevel@tonic-gate
2139444c26fSTom WhittenROOTSVCMANIFEST=		$(ROOTSVC)/manifest
2149444c26fSTom WhittenROOTSVCPROFILE=			$(ROOTETCSVC)/profile
2157c478bd9Sstevel@tonic-gate
2169444c26fSTom WhittenROOTSVCMILESTONE=		$(ROOTSVCMANIFEST)/milestone
2179444c26fSTom WhittenROOTSVCDEVICE=			$(ROOTSVCMANIFEST)/device
2189444c26fSTom WhittenROOTSVCSYSTEM=			$(ROOTSVCMANIFEST)/system
2197c478bd9Sstevel@tonic-gateROOTSVCSYSTEMDEVICE=		$(ROOTSVCSYSTEM)/device
2207c478bd9Sstevel@tonic-gateROOTSVCSYSTEMFILESYSTEM=	$(ROOTSVCSYSTEM)/filesystem
2217c478bd9Sstevel@tonic-gateROOTSVCSYSTEMSECURITY=		$(ROOTSVCSYSTEM)/security
2229444c26fSTom WhittenROOTSVCNETWORK=			$(ROOTSVCMANIFEST)/network
2234b22b933Srs200217ROOTSVCNETWORKDNS=		$(ROOTSVCNETWORK)/dns
224a6d42e7dSPeter DunlapROOTSVCNETWORKISCSI=		$(ROOTSVCNETWORK)/iscsi
2257c478bd9Sstevel@tonic-gateROOTSVCNETWORKLDAP=		$(ROOTSVCNETWORK)/ldap
2267c478bd9Sstevel@tonic-gateROOTSVCNETWORKNFS=		$(ROOTSVCNETWORK)/nfs
2277c478bd9Sstevel@tonic-gateROOTSVCNETWORKNIS=		$(ROOTSVCNETWORK)/nis
228a192e900SamaguireROOTSVCNETWORKROUTING=		$(ROOTSVCNETWORK)/routing
2297c478bd9Sstevel@tonic-gateROOTSVCNETWORKRPC=		$(ROOTSVCNETWORK)/rpc
2304bff34e3SthurlowROOTSVCNETWORKSMB=		$(ROOTSVCNETWORK)/smb
2317c478bd9Sstevel@tonic-gateROOTSVCNETWORKSECURITY=		$(ROOTSVCNETWORK)/security
232abf1b5ddSkaisROOTSVCNETWORKSSL=		$(ROOTSVCNETWORK)/ssl
233e3320f40SmarkfenROOTSVCNETWORKIPSEC=		$(ROOTSVCNETWORK)/ipsec
2346185db85SdougmROOTSVCNETWORKSHARES=		$(ROOTSVCNETWORK)/shares
235da6c28aaSamwROOTSVCSMB=			$(ROOTSVCNETWORK)/smb
2369444c26fSTom WhittenROOTSVCPLATFORM=		$(ROOTSVCMANIFEST)/platform
2377c478bd9Sstevel@tonic-gateROOTSVCPLATFORMSUN4U=		$(ROOTSVCPLATFORM)/sun4u
2381ae08745SheppoROOTSVCPLATFORMSUN4V=		$(ROOTSVCPLATFORM)/sun4v
2399444c26fSTom WhittenROOTSVCAPPLICATION=		$(ROOTSVCMANIFEST)/application
2407c478bd9Sstevel@tonic-gateROOTSVCAPPLICATIONMANAGEMENT=	$(ROOTSVCAPPLICATION)/management
2417c478bd9Sstevel@tonic-gateROOTSVCAPPLICATIONSECURITY=	$(ROOTSVCAPPLICATION)/security
2427c478bd9Sstevel@tonic-gateROOTSVCAPPLICATIONPRINT=	$(ROOTSVCAPPLICATION)/print
2437c478bd9Sstevel@tonic-gate
2447c478bd9Sstevel@tonic-gate#
2457c478bd9Sstevel@tonic-gate# Commands Makefiles delivering a manifest are expected to define MANIFEST.
2467c478bd9Sstevel@tonic-gate#
2477c478bd9Sstevel@tonic-gate# Like ROOTCMDDIR, any lower-level Makefiles that put their manifests in a
2487c478bd9Sstevel@tonic-gate# subdirectory of the manifest directories listed above should reset
2497c478bd9Sstevel@tonic-gate# ROOTMANIFESTDIR and use it in their `install' target. By default we set this
2507c478bd9Sstevel@tonic-gate# to a bogus value so that it will not conflict with any of the other values
2517c478bd9Sstevel@tonic-gate# already  defined in this Makefile.
2527c478bd9Sstevel@tonic-gate#
2537c478bd9Sstevel@tonic-gate# The manifest validation of the $SRC/cmd check target is also derived from a
2547c478bd9Sstevel@tonic-gate# valid MANIFEST setting.
2557c478bd9Sstevel@tonic-gate#
2569444c26fSTom WhittenROOTMANIFESTDIR=	$(ROOTSVCMANIFEST)/__nonexistent_directory__
2577c478bd9Sstevel@tonic-gateROOTMANIFEST=		$(MANIFEST:%=$(ROOTMANIFESTDIR)/%)
2587c478bd9Sstevel@tonic-gateCHKMANIFEST=		$(MANIFEST:%.xml=%.xmlchk)
2597c478bd9Sstevel@tonic-gate
2601f6eb021SLiane Praza# Manifests cannot be checked in parallel, because we are using the global
2611f6eb021SLiane Praza# repository that is in $(SRC)/cmd/svc/seed/global.db.  This is a
2621f6eb021SLiane Praza# repository that is built from the manifests in this workspace, whereas
2631f6eb021SLiane Praza# the build machine's repository may be out of sync with these manifests.
2641f6eb021SLiane Praza# Because we are using a private repository, svccfg-native must start up a
2651f6eb021SLiane Praza# private copy of configd-native.  We cannot have multiple copies of
2661f6eb021SLiane Praza# configd-native trying to access global.db simultaneously.
2671f6eb021SLiane Praza
2681f6eb021SLiane Praza.NO_PARALLEL:	$(CHKMANIFEST)
2691f6eb021SLiane Praza
2707c478bd9Sstevel@tonic-gate#
2717c478bd9Sstevel@tonic-gate# For installing "starter scripts" of services
2727c478bd9Sstevel@tonic-gate#
2737c478bd9Sstevel@tonic-gate
2747c478bd9Sstevel@tonic-gateROOTSVCMETHOD=		$(SVCMETHOD:%=$(ROOTLIBSVCMETHOD)/%)
2757c478bd9Sstevel@tonic-gate
2767c478bd9Sstevel@tonic-gateROOTSVCBINDIR=		$(ROOTLIBSVCBIN)/__nonexistent_directory__
2777c478bd9Sstevel@tonic-gateROOTSVCBIN= 		$(SVCBIN:%=$(ROOTSVCBINDIR)/%)
2787c478bd9Sstevel@tonic-gate
2797c478bd9Sstevel@tonic-gate#
2807c478bd9Sstevel@tonic-gate
2817c478bd9Sstevel@tonic-gate# For programs that are installed in the root filesystem,
2827c478bd9Sstevel@tonic-gate# build $(ROOTFS_PROG) rather than $(PROG)
2837c478bd9Sstevel@tonic-gate$(ROOTFS_PROG) := LDFLAGS += -Wl,-I/lib/ld.so.1
2847c478bd9Sstevel@tonic-gate
2857c478bd9Sstevel@tonic-gate$(KRB5BIN)/%: %
2867c478bd9Sstevel@tonic-gate	$(INS.file)
2877c478bd9Sstevel@tonic-gate
2887c478bd9Sstevel@tonic-gate$(KRB5SBIN)/%: %
2897c478bd9Sstevel@tonic-gate	$(INS.file)
2907c478bd9Sstevel@tonic-gate
2917c478bd9Sstevel@tonic-gate$(KRB5LIB)/%: %
2927c478bd9Sstevel@tonic-gate	$(INS.file)
2937c478bd9Sstevel@tonic-gate
2947c478bd9Sstevel@tonic-gate$(ROOTBIN)/%: %
2957c478bd9Sstevel@tonic-gate	$(INS.file)
2967c478bd9Sstevel@tonic-gate
2977c478bd9Sstevel@tonic-gate$(ROOTLIB)/%: %
2987c478bd9Sstevel@tonic-gate	$(INS.file)
2997c478bd9Sstevel@tonic-gate
3007c478bd9Sstevel@tonic-gate$(ROOTBIN64)/%: %
3017c478bd9Sstevel@tonic-gate	$(INS.file)
3027c478bd9Sstevel@tonic-gate
3037c478bd9Sstevel@tonic-gate$(ROOTLIB64)/%: %
3047c478bd9Sstevel@tonic-gate	$(INS.file)
3057c478bd9Sstevel@tonic-gate
3067c478bd9Sstevel@tonic-gate$(ROOTBIN32)/%: %
3077c478bd9Sstevel@tonic-gate	$(INS.file)
3087c478bd9Sstevel@tonic-gate
3097c478bd9Sstevel@tonic-gate$(ROOTSHLIB)/%: %
3107c478bd9Sstevel@tonic-gate	$(INS.file)
3117c478bd9Sstevel@tonic-gate
3125c51f124SMoriah Waterland$(ROOTPKGBIN)/%: %
3135c51f124SMoriah Waterland	$(INS.file)
3145c51f124SMoriah Waterland
3155c51f124SMoriah Waterland$(ROOTCLASS_SCR_DIR)/%: %
3165c51f124SMoriah Waterland	$(INS.file)
3175c51f124SMoriah Waterland
3185c51f124SMoriah Waterland$(ROOTADMIN_SRC_DIR)/%: %
3195c51f124SMoriah Waterland	$(INS.file)
3205c51f124SMoriah Waterland
3217c478bd9Sstevel@tonic-gate$(ROOTSBIN)/%: %
3227c478bd9Sstevel@tonic-gate	$(INS.file)
3237c478bd9Sstevel@tonic-gate
3247c478bd9Sstevel@tonic-gate$(ROOTUSRSBIN)/%: %
3257c478bd9Sstevel@tonic-gate	$(INS.file)
3267c478bd9Sstevel@tonic-gate
3277c478bd9Sstevel@tonic-gate$(ROOTUSRSBIN32)/%: %
3287c478bd9Sstevel@tonic-gate	$(INS.file)
3297c478bd9Sstevel@tonic-gate
3307c478bd9Sstevel@tonic-gate$(ROOTUSRSBIN64)/%: %
3317c478bd9Sstevel@tonic-gate	$(INS.file)
3327c478bd9Sstevel@tonic-gate
3337c478bd9Sstevel@tonic-gate$(ROOTETC)/%: %
3347c478bd9Sstevel@tonic-gate	$(INS.file)
3357c478bd9Sstevel@tonic-gate
3364e762ae7SAlexander Pyhalov$(ROOTETCFTPD)/%: %
3374e762ae7SAlexander Pyhalov	$(INS.file)
3384e762ae7SAlexander Pyhalov
339da14cebeSEric Cheng$(ROOTETCINET)/%: %
340da14cebeSEric Cheng	$(INS.file)
341da14cebeSEric Cheng
342a7872406Smeem$(ROOTETCDEFAULT)/%:	%.dfl
343a7872406Smeem	$(INS.rename)
344a7872406Smeem
345f875b4ebSrica$(ROOTETCTSOL)/%: %
346f875b4ebSrica	$(INS.file)
347f875b4ebSrica
348f875b4ebSrica$(ROOTETCSECLIB)/%: %
349f875b4ebSrica	$(INS.file)
350f875b4ebSrica
351f875b4ebSrica$(ROOTETCZONES)/%: %
352f875b4ebSrica	$(INS.file)
353f875b4ebSrica
354f875b4ebSrica$(ROOTLIBZONES)/%: %
355f875b4ebSrica	$(INS.file)
356f875b4ebSrica
35799ba4d70SRussell Blaine$(ROOTLIBXEN)/%: %
35899ba4d70SRussell Blaine	$(INS.file)
35999ba4d70SRussell Blaine
360ead1f93eSLiane Praza$(ROOTHASBIN)/%: %
361ead1f93eSLiane Praza	$(INS.file)
362ead1f93eSLiane Praza
363ead1f93eSLiane Praza$(ROOTHASLIB)/%: %
364ead1f93eSLiane Praza	$(INS.file)
365ead1f93eSLiane Praza
3667c478bd9Sstevel@tonic-gate$(ROOTUSRKVM)/%: %
3677c478bd9Sstevel@tonic-gate	$(INS.file)
3687c478bd9Sstevel@tonic-gate
3697c478bd9Sstevel@tonic-gate$(ROOTXPG4BIN)/%: %.xpg4
3707c478bd9Sstevel@tonic-gate	$(INS.rename)
3717c478bd9Sstevel@tonic-gate
3727c478bd9Sstevel@tonic-gate$(ROOTXPG4BIN32)/%: %.xpg4
3737c478bd9Sstevel@tonic-gate	$(INS.rename)
3747c478bd9Sstevel@tonic-gate
3757c478bd9Sstevel@tonic-gate$(ROOTXPG4BIN64)/%: %.xpg4
3767c478bd9Sstevel@tonic-gate	$(INS.rename)
3777c478bd9Sstevel@tonic-gate
3787c478bd9Sstevel@tonic-gate$(ROOTXPG6BIN)/%: %.xpg6
3797c478bd9Sstevel@tonic-gate	$(INS.rename)
3807c478bd9Sstevel@tonic-gate
3817c478bd9Sstevel@tonic-gate$(ROOTLOCALEDEF)/%: %
3827c478bd9Sstevel@tonic-gate	$(INS.file)
3837c478bd9Sstevel@tonic-gate
3847c478bd9Sstevel@tonic-gate$(ROOTCHARMAP)/%: %
3857c478bd9Sstevel@tonic-gate	$(INS.file)
3867c478bd9Sstevel@tonic-gate
3877c478bd9Sstevel@tonic-gate$(ROOTI18NEXT)/%: %
3887c478bd9Sstevel@tonic-gate	$(INS.file)
3897c478bd9Sstevel@tonic-gate
3907c478bd9Sstevel@tonic-gate$(ROOTI18NEXT64)/%: %
3917c478bd9Sstevel@tonic-gate	$(INS.file)
3927c478bd9Sstevel@tonic-gate
3937c478bd9Sstevel@tonic-gate$(ROOTLIBSVCMETHOD)/%: %
3947c478bd9Sstevel@tonic-gate	$(INS.file)
3957c478bd9Sstevel@tonic-gate
3967c478bd9Sstevel@tonic-gate$(ROOTLIBSVCBIN)/%: %
3977c478bd9Sstevel@tonic-gate	$(INS.file)
3987c478bd9Sstevel@tonic-gate
3997c478bd9Sstevel@tonic-gate$(ROOTSVCMILESTONE)/%: %
4007c478bd9Sstevel@tonic-gate	$(INS.file)
4017c478bd9Sstevel@tonic-gate
4027c478bd9Sstevel@tonic-gate$(ROOTSVCDEVICE)/%: %
4037c478bd9Sstevel@tonic-gate	$(INS.file)
4047c478bd9Sstevel@tonic-gate
4057c478bd9Sstevel@tonic-gate$(ROOTSVCSYSTEM)/%: %
4067c478bd9Sstevel@tonic-gate	$(INS.file)
4077c478bd9Sstevel@tonic-gate
4087c478bd9Sstevel@tonic-gate$(ROOTSVCSYSTEMDEVICE)/%: %
4097c478bd9Sstevel@tonic-gate	$(INS.file)
4107c478bd9Sstevel@tonic-gate
4117c478bd9Sstevel@tonic-gate$(ROOTSVCSYSTEMFILESYSTEM)/%: %
4127c478bd9Sstevel@tonic-gate	$(INS.file)
4137c478bd9Sstevel@tonic-gate
4147c478bd9Sstevel@tonic-gate$(ROOTSVCSYSTEMSECURITY)/%: %
4157c478bd9Sstevel@tonic-gate	$(INS.file)
4167c478bd9Sstevel@tonic-gate
4177c478bd9Sstevel@tonic-gate$(ROOTSVCNETWORK)/%: %
4187c478bd9Sstevel@tonic-gate	$(INS.file)
4197c478bd9Sstevel@tonic-gate
4207c478bd9Sstevel@tonic-gate$(ROOTSVCNETWORKLDAP)/%: %
4217c478bd9Sstevel@tonic-gate	$(INS.file)
4227c478bd9Sstevel@tonic-gate
4237c478bd9Sstevel@tonic-gate$(ROOTSVCNETWORKNFS)/%: %
4247c478bd9Sstevel@tonic-gate	$(INS.file)
4257c478bd9Sstevel@tonic-gate
4267c478bd9Sstevel@tonic-gate$(ROOTSVCNETWORKNIS)/%: %
4277c478bd9Sstevel@tonic-gate	$(INS.file)
4287c478bd9Sstevel@tonic-gate
4297c478bd9Sstevel@tonic-gate$(ROOTSVCNETWORKRPC)/%: %
4307c478bd9Sstevel@tonic-gate	$(INS.file)
4317c478bd9Sstevel@tonic-gate
4327c478bd9Sstevel@tonic-gate$(ROOTSVCNETWORKSECURITY)/%: %
4337c478bd9Sstevel@tonic-gate	$(INS.file)
4347c478bd9Sstevel@tonic-gate
435abf1b5ddSkais$(ROOTSVCNETWORKSSL)/%: %
436abf1b5ddSkais	$(INS.file)
437abf1b5ddSkais
438e3320f40Smarkfen$(ROOTSVCNETWORKIPSEC)/%: %
439e3320f40Smarkfen	$(INS.file)
440e3320f40Smarkfen
4416185db85Sdougm$(ROOTSVCNETWORKSHARES)/%: %
4426185db85Sdougm	$(INS.file)
4436185db85Sdougm
4444bff34e3Sthurlow$(ROOTSVCNETWORKSMB)/%: %
4454bff34e3Sthurlow	$(INS.file)
4464bff34e3Sthurlow
4477c478bd9Sstevel@tonic-gate$(ROOTSVCAPPLICATION)/%: %
4487c478bd9Sstevel@tonic-gate	$(INS.file)
4497c478bd9Sstevel@tonic-gate
4507c478bd9Sstevel@tonic-gate$(ROOTSVCAPPLICATIONMANAGEMENT)/%: %
4517c478bd9Sstevel@tonic-gate	$(INS.file)
4527c478bd9Sstevel@tonic-gate
4537c478bd9Sstevel@tonic-gate$(ROOTSVCAPPLICATIONSECURITY)/%: %
4547c478bd9Sstevel@tonic-gate	$(INS.file)
4557c478bd9Sstevel@tonic-gate
4567c478bd9Sstevel@tonic-gate$(ROOTSVCAPPLICATIONPRINT)/%: %
4577c478bd9Sstevel@tonic-gate	$(INS.file)
4587c478bd9Sstevel@tonic-gate
4597c478bd9Sstevel@tonic-gate$(ROOTSVCPLATFORM)/%: %
4607c478bd9Sstevel@tonic-gate	$(INS.file)
4617c478bd9Sstevel@tonic-gate
4627c478bd9Sstevel@tonic-gate$(ROOTSVCPLATFORMSUN4U)/%: %
4637c478bd9Sstevel@tonic-gate	$(INS.file)
4647c478bd9Sstevel@tonic-gate
4651ae08745Sheppo$(ROOTSVCPLATFORMSUN4V)/%: %
4661ae08745Sheppo	$(INS.file)
4671ae08745Sheppo
46867298654Sdamico# Install rule for gprof, yacc, and lex dependency files
46967298654Sdamico$(ROOTSHLIBCCS)/%: ../common/%
47067298654Sdamico	$(INS.file)
47167298654Sdamico
47267298654Sdamico$(ROOTCCSBINLINKDIR)/%: %
47367298654Sdamico	$(INS.ccsbinlink)
47467298654Sdamico
47567298654Sdamico$(ROOTCCSBINLINKDIR64)/%: %
47667298654Sdamico	$(INS.ccsbinlink64)
47767298654Sdamico
4787c478bd9Sstevel@tonic-gate$(ROOTMAN1)/%: %.sunman
4797c478bd9Sstevel@tonic-gate	$(INS.rename)
4807c478bd9Sstevel@tonic-gate
4817c478bd9Sstevel@tonic-gate$(ROOTMAN1M)/%: %.sunman
4827c478bd9Sstevel@tonic-gate	$(INS.rename)
4837c478bd9Sstevel@tonic-gate
4847c478bd9Sstevel@tonic-gate$(ROOTMAN3)/%: %.sunman
4857c478bd9Sstevel@tonic-gate	$(INS.rename)
4867c478bd9Sstevel@tonic-gate
487da6c28aaSamw$(ROOTVARSMB)/%: %
488da6c28aaSamw	$(INS.file)
489da6c28aaSamw
4907c478bd9Sstevel@tonic-gate# build rule for statically linked programs with single source file.
4917c478bd9Sstevel@tonic-gate%.static: %.c
4927c478bd9Sstevel@tonic-gate	$(LINK.c) -o $@ $< $(LDLIBS)
4937c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
4947c478bd9Sstevel@tonic-gate
4957c478bd9Sstevel@tonic-gate%.xpg4: %.c
4967c478bd9Sstevel@tonic-gate	$(LINK.c) -o $@ $< $(LDLIBS)
4977c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
4987c478bd9Sstevel@tonic-gate
4997c478bd9Sstevel@tonic-gate%.xpg6: %.c
5007c478bd9Sstevel@tonic-gate	$(LINK.c) -o $@ $< $(LDLIBS)
5017c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
5027c478bd9Sstevel@tonic-gate
5037c478bd9Sstevel@tonic-gate# Define the majority text domain in this directory.
5047c478bd9Sstevel@tonic-gateTEXT_DOMAIN= SUNW_OST_OSCMD
5057c478bd9Sstevel@tonic-gate
5067c478bd9Sstevel@tonic-gateCLOBBERFILES += $(XPG4) $(XPG6) $(DCFILE)
5077c478bd9Sstevel@tonic-gate
5087c478bd9Sstevel@tonic-gate# This flag is for programs which should not build a 32-bit binary
5097c478bd9Sstevel@tonic-gatesparc_64ONLY= $(POUND_SIGN)
5107c478bd9Sstevel@tonic-gate64ONLY=	 $($(MACH)_64ONLY)
511