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
]
22 # Copyright
2014 Garrett D
'Amore <garrett@damore.org>
23 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
25 # Definitions common to command source.
27 # include global definitions; SRC should be defined in the shell.
28 # SRC is needed until RFE 1026993 is implemented.
30 include $(SRC)/Makefile.master
42 KRB5BIN= $(KRB5DIR)/bin
43 KRB5SBIN= $(KRB5DIR)/sbin
44 KRB5LIB= $(KRB5DIR)/lib/krb5
45 KRB5RUNPATH= /usr/lib/krb5
46 GSSRUNPATH= /usr/lib/gss
49 ROOTBIN= $(ROOT)/usr/bin
50 ROOTLIB= $(ROOT)/usr/lib
51 ROOTLIBSVCBIN= $(ROOT)/lib/svc/bin
52 ROOTLIBSVCMETHOD= $(ROOT)/lib/svc/method
53 ROOTLIBZONES= $(ROOT)/lib/zones
55 ROOTSHLIB= $(ROOT)/usr/share/lib
57 ROOTSHLIBCCS= $(ROOTSHLIB)/ccs
58 ROOTSBIN= $(ROOT)/sbin
59 ROOTUSRSBIN= $(ROOT)/usr/sbin
62 ROOTETCSECURITY= $(ROOTETC)/security
63 ROOTETCSECLIB= $(ROOTETCSECURITY)/lib
64 ROOTETCZONES= $(ROOTETC)/zones
66 ROOTETCFTPD= $(ROOT)/etc/ftpd
67 ROOTETCINET= $(ROOT)/etc/inet
68 ROOTBIN32= $(ROOTBIN)/$(MACH32)
69 ROOTBIN64= $(ROOTBIN)/$(MACH64)
70 ROOTCMDDIR64= $(ROOTCMDDIR)/$(MACH64)
71 ROOTLIB64= $(ROOTLIB)/$(MACH64)
72 ROOTUSRSBIN32= $(ROOTUSRSBIN)/$(MACH32)
73 ROOTUSRSBIN64= $(ROOTUSRSBIN)/$(MACH64)
74 ROOTVARSMB= $(ROOT)/var/smb
78 # Like ROOTLIBDIR in $(SRC)/Makefile.lib, any lower-level Makefiles that
79 # put their binaries in a non-standard location should reset this and use
80 # $(ROOTCMD) in their `install' target. By default we
set this to a bogus
81 # value so that it will
not conflict with any of the other values already
82 # defined in this Makefile.
84 ROOTCMDDIR
= $
(ROOT
)/__nonexistent_directory__
86 ISAEXEC
= $
(ROOT
)/usr
/lib
/isaexec
87 PLATEXEC
= $
(ROOT
)/usr
/lib
/platexec
89 LDLIBS
= $
(LDLIBS.
cmd)
92 $
(BDIRECT
) $
(ENVLDFLAGS1
) $
(ENVLDFLAGS2
) $
(ENVLDFLAGS3
) \
93 $
(MAPFILE.PGA
:%=-Wl
,-M
%)
95 LDFLAGS
= $
(LDFLAGS.
cmd)
98 KRB5PROG
= $
(PROG
:%=$
(KRB5BIN
)/%)
99 KRB5SBINPROG
= $
(PROG
:%=$
(KRB5SBIN
)/%)
100 KRB5LIBPROG
= $
(PROG
:%=$
(KRB5LIB
)/%)
102 ROOTPROG
= $
(PROG
:%=$
(ROOTBIN
)/%)
103 ROOTCMD
= $
(PROG
:%=$
(ROOTCMDDIR
)/%)
104 ROOTSHFILES
= $
(SHFILES
:%=$
(ROOTBIN
)/%)
105 ROOTLIBPROG
= $
(PROG
:%=$
(ROOTLIB
)/%)
106 ROOTLIBSHFILES
= $
(SHFILES
:%=$
(ROOTLIB
)/%)
107 ROOTSHLIBPROG
= $
(PROG
:%=$
(ROOTSHLIB
)/%)
108 ROOTSBINPROG
= $
(PROG
:%=$
(ROOTSBIN
)/%)
109 ROOTUSRSBINPROG
=$
(PROG
:%=$
(ROOTUSRSBIN
)/%)
110 ROOTUSRSBINSCRIPT
=$
(SCRIPT
:%=$
(ROOTUSRSBIN
)/%)
111 ROOTLOCALEPROG
= $
(PROG
:%=$
(ROOTLOCALEDEF
)/%)
112 ROOTPROG64
= $
(PROG
:%=$
(ROOTBIN64
)/%)
113 ROOTPROG32
= $
(PROG
:%=$
(ROOTBIN32
)/%)
114 ROOTCMD64
= $
(PROG
:%=$
(ROOTCMDDIR64
)/%)
115 ROOTUSRSBINPROG32
= $
(PROG
:%=$
(ROOTUSRSBIN32
)/%)
116 ROOTUSRSBINPROG64
= $
(PROG
:%=$
(ROOTUSRSBIN64
)/%)
118 ROOTETCDEFAULT
= $
(ROOTETC
)/default
119 ROOTETCDEFAULTFILES
= $
(DEFAULTFILES
:%.dfl
=$
(ROOTETCDEFAULT
)/%)
120 $
(ROOTETCDEFAULTFILES
) := FILEMODE
= 0644
122 ROOTETCSECFILES
= $
(ETCSECFILES
:%=$
(ROOTETCSECURITY
)/%)
123 $
(ROOTETCSECFILES
) := FILEMODE
= 0644
125 ROOTETCSECLIBFILES
= $
(ETCSECLIBFILES
:%=$
(ROOTETCSECLIB
)/%)
127 ROOTETCZONESFILES
= $
(ETCZONESFILES
:%=$
(ROOTETCZONES
)/%)
128 $
(ROOTETCZONESFILES
) := FILEMODE
= 0444
130 ROOTLIBZONESFILES
= $
(LIBZONESFILES
:%=$
(ROOTLIBZONES
)/%)
131 $
(ROOTLIBZONESFILES
) := FILEMODE
= 0555
134 # Directories
for smf
(5) service manifests and profiles.
136 ROOTSVC
= $
(ROOT
)/lib
/svc
137 ROOTETCSVC
= $
(ROOT
)/etc
/svc
139 ROOTSVCMANIFEST
= $
(ROOTSVC
)/manifest
140 ROOTSVCPROFILE
= $
(ROOTETCSVC
)/profile
142 ROOTSVCMILESTONE
= $
(ROOTSVCMANIFEST
)/milestone
143 ROOTSVCDEVICE
= $
(ROOTSVCMANIFEST
)/device
144 ROOTSVCSYSTEM
= $
(ROOTSVCMANIFEST
)/system
145 ROOTSVCSYSTEMDEVICE
= $
(ROOTSVCSYSTEM
)/device
146 ROOTSVCSYSTEMFILESYSTEM
= $
(ROOTSVCSYSTEM
)/filesystem
147 ROOTSVCSYSTEMSECURITY
= $
(ROOTSVCSYSTEM
)/security
148 ROOTSVCNETWORK
= $
(ROOTSVCMANIFEST
)/network
149 ROOTSVCNETWORKDNS
= $
(ROOTSVCNETWORK
)/dns
150 ROOTSVCNETWORKISCSI
= $
(ROOTSVCNETWORK
)/iscsi
151 ROOTSVCNETWORKLDAP
= $
(ROOTSVCNETWORK
)/ldap
152 ROOTSVCNETWORKNFS
= $
(ROOTSVCNETWORK
)/nfs
153 ROOTSVCNETWORKNIS
= $
(ROOTSVCNETWORK
)/nis
154 ROOTSVCNETWORKROUTING
= $
(ROOTSVCNETWORK
)/routing
155 ROOTSVCNETWORKRPC
= $
(ROOTSVCNETWORK
)/rpc
156 ROOTSVCNETWORKSMB
= $
(ROOTSVCNETWORK
)/smb
157 ROOTSVCNETWORKSECURITY
= $
(ROOTSVCNETWORK
)/security
158 ROOTSVCNETWORKIPSEC
= $
(ROOTSVCNETWORK
)/ipsec
159 ROOTSVCNETWORKSHARES
= $
(ROOTSVCNETWORK
)/shares
160 ROOTSVCSMB
= $
(ROOTSVCNETWORK
)/smb
161 ROOTSVCPLATFORM
= $
(ROOTSVCMANIFEST
)/platform
162 ROOTSVCPLATFORMSUN4U
= $
(ROOTSVCPLATFORM
)/sun4u
163 ROOTSVCPLATFORMSUN4V
= $
(ROOTSVCPLATFORM
)/sun4v
164 ROOTSVCAPPLICATION
= $
(ROOTSVCMANIFEST
)/application
165 ROOTSVCAPPLICATIONMANAGEMENT
= $
(ROOTSVCAPPLICATION
)/management
166 ROOTSVCAPPLICATIONSECURITY
= $
(ROOTSVCAPPLICATION
)/security
167 ROOTSVCAPPLICATIONPRINT
= $
(ROOTSVCAPPLICATION
)/print
170 # Commands Makefiles delivering a manifest are expected to define MANIFEST.
172 # Like ROOTCMDDIR
, any lower
-level Makefiles that put their manifests in a
173 # subdirectory of the manifest directories listed above should reset
174 # ROOTMANIFESTDIR and
use it in their `install
' target. By default we set this
175 # to a bogus value so that it will not conflict with any of the other values
176 # already defined in this Makefile.
178 # The manifest validation of the $SRC/cmd check target is also derived from a
179 # valid MANIFEST setting.
181 ROOTMANIFESTDIR= $(ROOTSVCMANIFEST)/__nonexistent_directory__
182 ROOTMANIFEST= $(MANIFEST:%=$(ROOTMANIFESTDIR)/%)
183 CHKMANIFEST= $(MANIFEST:%.xml=%.xmlchk)
185 # Manifests cannot be checked in parallel, because we are using the global
186 # repository that is in $(SRC)/cmd/svc/seed/global.db. This is a
187 # repository that is built from the manifests in this workspace, whereas
188 # the build machine's repository may be out of sync with these manifests.
189 # Because we are using a private repository
, svccfg
-native must
start up a
190 # private
copy of configd
-native. We cannot have multiple copies of
191 # configd
-native trying to access global.db simultaneously.
193 .NO_PARALLEL
: $
(CHKMANIFEST
)
196 #
For installing
"starter scripts" of services
199 ROOTSVCMETHOD
= $
(SVCMETHOD
:%=$
(ROOTLIBSVCMETHOD
)/%)
201 ROOTSVCBINDIR
= $
(ROOTLIBSVCBIN
)/__nonexistent_directory__
202 ROOTSVCBIN
= $
(SVCBIN
:%=$
(ROOTSVCBINDIR
)/%)
206 #
For programs that are installed in the root filesystem
,
207 # build $
(ROOTFS_PROG
) rather than $
(PROG
)
208 $
(ROOTFS_PROG
) := LDFLAGS
+= -Wl
,-I
/lib
/ld.so
.1
243 $
(ROOTUSRSBIN32
)/%: %
246 $
(ROOTUSRSBIN64
)/%: %
258 $
(ROOTETCDEFAULT
)/%: %.dfl
261 $
(ROOTETCSECLIB
)/%: %
270 $
(ROOTLOCALEDEF
)/%: %
279 $
(ROOTI18NEXT64
)/%: %
282 $
(ROOTLIBSVCMETHOD
)/%: %
285 $
(ROOTLIBSVCBIN
)/%: %
288 $
(ROOTSVCMILESTONE
)/%: %
291 $
(ROOTSVCDEVICE
)/%: %
294 $
(ROOTSVCSYSTEM
)/%: %
297 $
(ROOTSVCSYSTEMDEVICE
)/%: %
300 $
(ROOTSVCSYSTEMFILESYSTEM
)/%: %
303 $
(ROOTSVCSYSTEMSECURITY
)/%: %
306 $
(ROOTSVCNETWORK
)/%: %
309 $
(ROOTSVCNETWORKLDAP
)/%: %
312 $
(ROOTSVCNETWORKNFS
)/%: %
315 $
(ROOTSVCNETWORKNIS
)/%: %
318 $
(ROOTSVCNETWORKRPC
)/%: %
321 $
(ROOTSVCNETWORKSECURITY
)/%: %
324 $
(ROOTSVCNETWORKIPSEC
)/%: %
327 $
(ROOTSVCNETWORKSHARES
)/%: %
330 $
(ROOTSVCNETWORKSMB
)/%: %
333 $
(ROOTSVCAPPLICATION
)/%: %
336 $
(ROOTSVCAPPLICATIONMANAGEMENT
)/%: %
339 $
(ROOTSVCAPPLICATIONSECURITY
)/%: %
342 $
(ROOTSVCAPPLICATIONPRINT
)/%: %
345 $
(ROOTSVCPLATFORM
)/%: %
348 $
(ROOTSVCPLATFORMSUN4U
)/%: %
351 $
(ROOTSVCPLATFORMSUN4V
)/%: %
354 # Install rule
for gprof
, yacc
, and lex dependency
files
355 $
(ROOTSHLIBCCS
)/%: ..
/common
/%
361 # build rule
for statically linked programs with single source file.
363 $
(LINK.c
) -o $@ $
< $
(LDLIBS
)
366 # Define the majority text domain in this directory.
367 TEXT_DOMAIN
= SUNW_OST_OSCMD
369 CLOBBERFILES
+= $
(DCFILE
)
371 # This flag is
for programs which should
not build a
32-bit binary
372 sparc_64ONLY
= $
(POUND_SIGN
)
373 64ONLY
= $
($
(MACH
)_64ONLY
)