dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / sgs / Makefile
blob0b928834ca86cd1326c1fee7a83c2d60cdb0a50c
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 (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
23 # Copyright 2016 RackTop Systems.
24 # Copyright 2017 Joyent, Inc.
27 include $(SRC)/cmd/Makefile.cmd
29 # Note: Why SUBDIRS isn't sorted alphabetically
31 # The items under SGS are not independent of each other.
32 # They must be built in an order that ensures that
33 # all dependencies of an item have been built before the
34 # item itself.
36 SUBDIRS= libconv \
37 .WAIT \
38 libdl \
39 libelf \
40 liblddbg \
41 .WAIT \
42 libld \
43 libldmake \
44 libldstab \
45 librtld \
46 libcrle \
47 .WAIT \
48 ld \
49 ldd \
50 lddstub \
51 rtld \
52 .WAIT \
53 librtld_db \
54 ldprof \
55 pvs \
56 crle \
57 ar \
58 dump \
59 elfdump \
60 elfedit \
61 elfwrap \
62 error \
63 gprof \
64 lari \
65 lex \
66 lorder \
67 m4 \
68 mcs \
69 moe \
70 nm \
71 prof \
72 ranlib \
73 symorder \
74 unifdef \
75 yacc
77 # Messaging support
79 POSUBDIRS= m4 nm yacc
80 POFILE= sgs.po
81 POFILES= $(POSUBDIRS:%=%/%.po)
83 MSGSUBDIRS= ld ldd libld liblddbg \
84 libldstab librtld rtld libelf \
85 ldprof libcrle pvs elfdump \
86 elfedit crle moe lari \
87 librtld_db elfwrap ar
89 MSGDIR= messages
92 all := TARGET= all
93 install := TARGET= install
94 clean := TARGET= clean
95 clobber := TARGET= clobber
96 delete := TARGET= delete
97 _msg := TARGET= catalog
98 _msg_gettext := TARGET= catalog
99 _msg_sgsmsg := TARGET= catalog
100 chkmsg := TARGET= chkmsg
103 .KEEP_STATE:
105 .PARALLEL: $(SUBDIRS)
107 all install: native-add .WAIT $(SUBDIRS)
109 include $(SRC)/cmd/Makefile.targ
111 # Messaging support
113 _msg: _msg_gettext _msg_sgsmsg
115 _msg_gettext: $(MSGDOMAIN)/$(POFILE)
117 # $(MACH)/sgsmsg must be built before we can descend into $(MSGDIR)
118 _msg_sgsmsg: native-add .WAIT $(MSGDIR)
120 $(MSGDOMAIN)/$(POFILE): \
121 $(MSGDOMAIN) $(POFILE)
123 $(POFILE): $(POSUBDIRS)
124 $(RM) $(POFILE)
125 cat $(POFILES) > $(POFILE)
127 $(MSGDIR): $(MSGSUBDIRS) FRC
128 @ cd $@; pwd; $(MAKE) $(TARGET)
130 chkmsg: $(MSGSUBDIRS) FRC
132 check: chkmsg
134 # built from lib/Makefile
135 install_lib: FRC
136 @ cd lex; pwd; $(MAKE) $@
137 @ cd yacc; pwd; $(MAKE) $@
139 delete \
140 clean clobber: native-clobber .WAIT $(SUBDIRS) $(MSGDIR)
142 $(SUBDIRS): FRC
143 @ cd $@; pwd; $(MAKE) $(TARGET)
146 # Integration of ld and ld.so.1 in some developement cycles requires that both
147 # of these modules be built using the new ld. This `native' target allows us
148 # to build a local ld which will then be used to build the delivered version of
149 # itself and ld.so.1. Once this new functionality appears in the standard ld
150 # this target can be disabled.
152 native-add: FRC
153 @ cd tools/$(MACH); pwd; $(MAKE) native
154 @ cd libconv/$(MACH); pwd; $(MAKE)
155 @ cd libelf/$(MACH); pwd; $(MAKE) native
156 @ cd liblddbg/$(MACH); pwd; $(MAKE) native
157 @ cd libldstab/$(MACH); pwd; $(MAKE) native
158 @ cd libld/$(MACH); pwd; $(MAKE) native
159 @ cd ld/$(MACH); pwd; $(MAKE) native
161 native-clobber:
162 @ cd tools; pwd; $(MAKE) $(TARGET)
163 $(RM) -r proto/$(MACH)
165 FRC: