sd: remove 'ssd' driver support
[unleashed/tickless.git] / usr / src / cmd / Makefile.cmd
blob47c74c228a307a00685555d6a10a114902bd2aa3
2 # CDDL HEADER START
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]
19 # CDDL HEADER END
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
32 LN= ln
33 SH= sh
34 ECHO= echo
35 MKDIR= mkdir
36 TOUCH= touch
38 FILEMODE= 0555
39 LIBFILEMODE= 0444
41 KRB5DIR= $(ROOT)/usr
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
56 ROOTPKGBIN= $(ROOT)/usr/sadm/install/bin
57 ROOTCLASS_SCR_DIR= $(ROOT)/usr/sadm/install/scripts
58 ROOTADMIN_SRC_DIR= $(ROOT)/var/sadm/install/admin
60 ROOTSHLIBCCS= $(ROOTSHLIB)/ccs
61 ROOTSBIN= $(ROOT)/sbin
62 ROOTUSRSBIN= $(ROOT)/usr/sbin
63 ROOTETC= $(ROOT)/etc
65 ROOTETCSECURITY= $(ROOTETC)/security
66 ROOTETCSECLIB= $(ROOTETCSECURITY)/lib
67 ROOTETCZONES= $(ROOTETC)/zones
69 ROOTETCFTPD= $(ROOT)/etc/ftpd
70 ROOTETCINET= $(ROOT)/etc/inet
71 ROOTCCSBIN= $(ROOT)/usr/ccs/bin
72 ROOTCCSBIN64= $(ROOTCCSBIN)/$(MACH64)
73 ROOTCCSBINLINKDIR= $(ROOT)/../../bin
74 ROOTCCSBINLINKDIR64= $(ROOT)../../../bin/$(MACH)
75 ROOTCCSLIB= $(ROOT)/usr/ccs/lib
76 ROOTBIN32= $(ROOTBIN)/$(MACH32)
77 ROOTBIN64= $(ROOTBIN)/$(MACH64)
78 ROOTCMDDIR64= $(ROOTCMDDIR)/$(MACH64)
79 ROOTLIB64= $(ROOTLIB)/$(MACH64)
80 ROOTUSRSBIN32= $(ROOTUSRSBIN)/$(MACH32)
81 ROOTUSRSBIN64= $(ROOTUSRSBIN)/$(MACH64)
82 ROOTMAN= $(ROOT)/usr/share/man
83 ROOTMAN1= $(ROOTMAN)/man1
84 ROOTMAN1M= $(ROOTMAN)/man1m
85 ROOTMAN3= $(ROOTMAN)/man3
86 ROOTVARSMB= $(ROOT)/var/smb
90 # Like ROOTLIBDIR in $(SRC)/Makefile.lib, any lower-level Makefiles that
91 # put their binaries in a non-standard location should reset this and use
92 # $(ROOTCMD) in their `install' target. By default we set this to a bogus
93 # value so that it will not conflict with any of the other values already
94 # defined in this Makefile.
96 ROOTCMDDIR= $(ROOT)/__nonexistent_directory__
98 ROOTSHAUDIO= $(ROOT)/usr/share/audio
99 ROOTAUDIOSAMP= $(ROOTSHAUDIO)/samples
100 ROOTAUDIOSAMPAU=$(ROOTAUDIOSAMP)/au
102 ISAEXEC= $(ROOT)/usr/lib/isaexec
103 PLATEXEC= $(ROOT)/usr/lib/platexec
105 LDLIBS = $(LDLIBS.cmd)
107 LDFLAGS.cmd = \
108 $(BDIRECT) $(ENVLDFLAGS1) $(ENVLDFLAGS2) $(ENVLDFLAGS3) \
109 $(MAPFILE.PGA:%=-Wl,-M%)
111 LDFLAGS = $(LDFLAGS.cmd)
114 KRB5PROG= $(PROG:%=$(KRB5BIN)/%)
115 KRB5SBINPROG= $(PROG:%=$(KRB5SBIN)/%)
116 KRB5LIBPROG= $(PROG:%=$(KRB5LIB)/%)
118 ROOTPROG= $(PROG:%=$(ROOTBIN)/%)
119 ROOTCMD= $(PROG:%=$(ROOTCMDDIR)/%)
120 ROOTSHFILES= $(SHFILES:%=$(ROOTBIN)/%)
121 ROOTLIBPROG= $(PROG:%=$(ROOTLIB)/%)
122 ROOTLIBSHFILES= $(SHFILES:%=$(ROOTLIB)/%)
123 ROOTSHLIBPROG= $(PROG:%=$(ROOTSHLIB)/%)
124 ROOTSBINPROG= $(PROG:%=$(ROOTSBIN)/%)
125 ROOTPKGBINPROG= $(PROG:%=$(ROOTPKGBIN)/%)
126 ROOTCLASS_SCR_FILES= $(SCRIPTS:%=$(ROOTCLASS_SCR_DIR)/%)
127 ROOTUSRSBINPROG=$(PROG:%=$(ROOTUSRSBIN)/%)
128 ROOTUSRSBINSCRIPT=$(SCRIPT:%=$(ROOTUSRSBIN)/%)
129 ROOTETCPROG= $(PROG:%=$(ROOTETC)/%)
130 ROOTCCSBINPROG= $(PROG:%=$(ROOTCCSBIN)/%)
131 ROOTCCSBINPROG64= $(PROG:%=$(ROOTCCSBIN64)/%)
132 ROOTCCSBINLINK=$(PROG:%= $(ROOTCCSBINLINKDIR)/%)
133 ROOTCCSBINLINK64=$(PROG:%=$(ROOTCCSBINLINKDIR64)/%)
134 ROOTLOCALEPROG= $(PROG:%=$(ROOTLOCALEDEF)/%)
135 ROOTPROG64= $(PROG:%=$(ROOTBIN64)/%)
136 ROOTPROG32= $(PROG:%=$(ROOTBIN32)/%)
137 ROOTCMD64= $(PROG:%=$(ROOTCMDDIR64)/%)
138 ROOTUSRSBINPROG32= $(PROG:%=$(ROOTUSRSBIN32)/%)
139 ROOTUSRSBINPROG64= $(PROG:%=$(ROOTUSRSBIN64)/%)
140 ROOTMAN1FILES= $(MAN1FILES:%=$(ROOTMAN1)/%)
141 $(ROOTMAN1FILES) := FILEMODE= 444
142 ROOTMAN1MFILES= $(MAN1MFILES:%=$(ROOTMAN1M)/%)
143 $(ROOTMAN1MFILES) := FILEMODE= 444
144 ROOTMAN3FILES= $(MAN3FILES:%=$(ROOTMAN3)/%)
145 $(ROOTMAN3FILES) := FILEMODE= 444
147 # Symlink rules for /usr/ccs/bin commands. Note, those commands under
148 # the rule of the linker area, are controlled by a different set of
149 # rules defined in $(SRC)/cmd/sgs/Makefile.var.
151 INS.ccsbinlink= \
152 $(RM) $(ROOTCCSBINPROG); \
153 $(SYMLINK) ../../bin/$(PROG) $(ROOTCCSBINPROG)
155 INS.ccsbinlink64= \
156 $(RM) $(ROOTCCSBINPROG64); \
157 $(SYMLINK) ../../../bin/$(MACH64)/$(PROG) $(ROOTCCSBINPROG64)
159 ROOTETCDEFAULT= $(ROOTETC)/default
160 ROOTETCDEFAULTFILES= $(DEFAULTFILES:%.dfl=$(ROOTETCDEFAULT)/%)
161 $(ROOTETCDEFAULTFILES) := FILEMODE = 0644
163 ROOTETCSECFILES= $(ETCSECFILES:%=$(ROOTETCSECURITY)/%)
164 $(ROOTETCSECFILES) := FILEMODE = 0644
166 ROOTETCSECLIBFILES= $(ETCSECLIBFILES:%=$(ROOTETCSECLIB)/%)
168 ROOTETCZONESFILES= $(ETCZONESFILES:%=$(ROOTETCZONES)/%)
169 $(ROOTETCZONESFILES) := FILEMODE = 0444
171 ROOTLIBZONESFILES= $(LIBZONESFILES:%=$(ROOTLIBZONES)/%)
172 $(ROOTLIBZONESFILES) := FILEMODE = 0555
174 ROOTADMIN_SRC_FILE= $(ADMINFILE:%=$(ROOTADMIN_SRC_DIR)/%)
175 $(ROOTADMIN_SRC_FILE) := FILEMODE = 0444
178 # Directories for smf(5) service manifests and profiles.
180 ROOTSVC= $(ROOT)/lib/svc
181 ROOTETCSVC= $(ROOT)/etc/svc
183 ROOTSVCMANIFEST= $(ROOTSVC)/manifest
184 ROOTSVCPROFILE= $(ROOTETCSVC)/profile
186 ROOTSVCMILESTONE= $(ROOTSVCMANIFEST)/milestone
187 ROOTSVCDEVICE= $(ROOTSVCMANIFEST)/device
188 ROOTSVCSYSTEM= $(ROOTSVCMANIFEST)/system
189 ROOTSVCSYSTEMDEVICE= $(ROOTSVCSYSTEM)/device
190 ROOTSVCSYSTEMFILESYSTEM= $(ROOTSVCSYSTEM)/filesystem
191 ROOTSVCSYSTEMSECURITY= $(ROOTSVCSYSTEM)/security
192 ROOTSVCNETWORK= $(ROOTSVCMANIFEST)/network
193 ROOTSVCNETWORKDNS= $(ROOTSVCNETWORK)/dns
194 ROOTSVCNETWORKISCSI= $(ROOTSVCNETWORK)/iscsi
195 ROOTSVCNETWORKLDAP= $(ROOTSVCNETWORK)/ldap
196 ROOTSVCNETWORKNFS= $(ROOTSVCNETWORK)/nfs
197 ROOTSVCNETWORKNIS= $(ROOTSVCNETWORK)/nis
198 ROOTSVCNETWORKROUTING= $(ROOTSVCNETWORK)/routing
199 ROOTSVCNETWORKRPC= $(ROOTSVCNETWORK)/rpc
200 ROOTSVCNETWORKSMB= $(ROOTSVCNETWORK)/smb
201 ROOTSVCNETWORKSECURITY= $(ROOTSVCNETWORK)/security
202 ROOTSVCNETWORKIPSEC= $(ROOTSVCNETWORK)/ipsec
203 ROOTSVCNETWORKSHARES= $(ROOTSVCNETWORK)/shares
204 ROOTSVCSMB= $(ROOTSVCNETWORK)/smb
205 ROOTSVCPLATFORM= $(ROOTSVCMANIFEST)/platform
206 ROOTSVCPLATFORMSUN4U= $(ROOTSVCPLATFORM)/sun4u
207 ROOTSVCPLATFORMSUN4V= $(ROOTSVCPLATFORM)/sun4v
208 ROOTSVCAPPLICATION= $(ROOTSVCMANIFEST)/application
209 ROOTSVCAPPLICATIONMANAGEMENT= $(ROOTSVCAPPLICATION)/management
210 ROOTSVCAPPLICATIONSECURITY= $(ROOTSVCAPPLICATION)/security
211 ROOTSVCAPPLICATIONPRINT= $(ROOTSVCAPPLICATION)/print
214 # Commands Makefiles delivering a manifest are expected to define MANIFEST.
216 # Like ROOTCMDDIR, any lower-level Makefiles that put their manifests in a
217 # subdirectory of the manifest directories listed above should reset
218 # ROOTMANIFESTDIR and use it in their `install' target. By default we set this
219 # to a bogus value so that it will not conflict with any of the other values
220 # already defined in this Makefile.
222 # The manifest validation of the $SRC/cmd check target is also derived from a
223 # valid MANIFEST setting.
225 ROOTMANIFESTDIR= $(ROOTSVCMANIFEST)/__nonexistent_directory__
226 ROOTMANIFEST= $(MANIFEST:%=$(ROOTMANIFESTDIR)/%)
227 CHKMANIFEST= $(MANIFEST:%.xml=%.xmlchk)
229 # Manifests cannot be checked in parallel, because we are using the global
230 # repository that is in $(SRC)/cmd/svc/seed/global.db. This is a
231 # repository that is built from the manifests in this workspace, whereas
232 # the build machine's repository may be out of sync with these manifests.
233 # Because we are using a private repository, svccfg-native must start up a
234 # private copy of configd-native. We cannot have multiple copies of
235 # configd-native trying to access global.db simultaneously.
237 .NO_PARALLEL: $(CHKMANIFEST)
240 # For installing "starter scripts" of services
243 ROOTSVCMETHOD= $(SVCMETHOD:%=$(ROOTLIBSVCMETHOD)/%)
245 ROOTSVCBINDIR= $(ROOTLIBSVCBIN)/__nonexistent_directory__
246 ROOTSVCBIN= $(SVCBIN:%=$(ROOTSVCBINDIR)/%)
250 # For programs that are installed in the root filesystem,
251 # build $(ROOTFS_PROG) rather than $(PROG)
252 $(ROOTFS_PROG) := LDFLAGS += -Wl,-I/lib/ld.so.1
254 $(KRB5BIN)/%: %
255 $(INS.file)
257 $(KRB5SBIN)/%: %
258 $(INS.file)
260 $(KRB5LIB)/%: %
261 $(INS.file)
263 $(ROOTBIN)/%: %
264 $(INS.file)
266 $(ROOTLIB)/%: %
267 $(INS.file)
269 $(ROOTBIN64)/%: %
270 $(INS.file)
272 $(ROOTLIB64)/%: %
273 $(INS.file)
275 $(ROOTBIN32)/%: %
276 $(INS.file)
278 $(ROOTSHLIB)/%: %
279 $(INS.file)
281 $(ROOTPKGBIN)/%: %
282 $(INS.file)
284 $(ROOTCLASS_SCR_DIR)/%: %
285 $(INS.file)
287 $(ROOTADMIN_SRC_DIR)/%: %
288 $(INS.file)
290 $(ROOTSBIN)/%: %
291 $(INS.file)
293 $(ROOTUSRSBIN)/%: %
294 $(INS.file)
296 $(ROOTUSRSBIN32)/%: %
297 $(INS.file)
299 $(ROOTUSRSBIN64)/%: %
300 $(INS.file)
302 $(ROOTETC)/%: %
303 $(INS.file)
305 $(ROOTETCFTPD)/%: %
306 $(INS.file)
308 $(ROOTETCINET)/%: %
309 $(INS.file)
311 $(ROOTETCDEFAULT)/%: %.dfl
312 $(INS.rename)
314 $(ROOTETCSECLIB)/%: %
315 $(INS.file)
317 $(ROOTETCZONES)/%: %
318 $(INS.file)
320 $(ROOTLIBZONES)/%: %
321 $(INS.file)
323 $(ROOTLOCALEDEF)/%: %
324 $(INS.file)
326 $(ROOTCHARMAP)/%: %
327 $(INS.file)
329 $(ROOTI18NEXT)/%: %
330 $(INS.file)
332 $(ROOTI18NEXT64)/%: %
333 $(INS.file)
335 $(ROOTLIBSVCMETHOD)/%: %
336 $(INS.file)
338 $(ROOTLIBSVCBIN)/%: %
339 $(INS.file)
341 $(ROOTSVCMILESTONE)/%: %
342 $(INS.file)
344 $(ROOTSVCDEVICE)/%: %
345 $(INS.file)
347 $(ROOTSVCSYSTEM)/%: %
348 $(INS.file)
350 $(ROOTSVCSYSTEMDEVICE)/%: %
351 $(INS.file)
353 $(ROOTSVCSYSTEMFILESYSTEM)/%: %
354 $(INS.file)
356 $(ROOTSVCSYSTEMSECURITY)/%: %
357 $(INS.file)
359 $(ROOTSVCNETWORK)/%: %
360 $(INS.file)
362 $(ROOTSVCNETWORKLDAP)/%: %
363 $(INS.file)
365 $(ROOTSVCNETWORKNFS)/%: %
366 $(INS.file)
368 $(ROOTSVCNETWORKNIS)/%: %
369 $(INS.file)
371 $(ROOTSVCNETWORKRPC)/%: %
372 $(INS.file)
374 $(ROOTSVCNETWORKSECURITY)/%: %
375 $(INS.file)
377 $(ROOTSVCNETWORKIPSEC)/%: %
378 $(INS.file)
380 $(ROOTSVCNETWORKSHARES)/%: %
381 $(INS.file)
383 $(ROOTSVCNETWORKSMB)/%: %
384 $(INS.file)
386 $(ROOTSVCAPPLICATION)/%: %
387 $(INS.file)
389 $(ROOTSVCAPPLICATIONMANAGEMENT)/%: %
390 $(INS.file)
392 $(ROOTSVCAPPLICATIONSECURITY)/%: %
393 $(INS.file)
395 $(ROOTSVCAPPLICATIONPRINT)/%: %
396 $(INS.file)
398 $(ROOTSVCPLATFORM)/%: %
399 $(INS.file)
401 $(ROOTSVCPLATFORMSUN4U)/%: %
402 $(INS.file)
404 $(ROOTSVCPLATFORMSUN4V)/%: %
405 $(INS.file)
407 # Install rule for gprof, yacc, and lex dependency files
408 $(ROOTSHLIBCCS)/%: ../common/%
409 $(INS.file)
411 $(ROOTCCSBINLINKDIR)/%: %
412 $(INS.ccsbinlink)
414 $(ROOTCCSBINLINKDIR64)/%: %
415 $(INS.ccsbinlink64)
417 $(ROOTVARSMB)/%: %
418 $(INS.file)
420 # build rule for statically linked programs with single source file.
421 %.static: %.c
422 $(LINK.c) -o $@ $< $(LDLIBS)
423 $(POST_PROCESS)
425 # Define the majority text domain in this directory.
426 TEXT_DOMAIN= SUNW_OST_OSCMD
428 CLOBBERFILES += $(DCFILE)
430 # This flag is for programs which should not build a 32-bit binary
431 sparc_64ONLY= $(POUND_SIGN)
432 64ONLY= $($(MACH)_64ONLY)