Print this page
1681 support for BUILD64=# no longer works
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libc/Makefile
+++ new/usr/src/lib/libc/Makefile
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
↓ open down ↓ |
16 lines elided |
↑ open up ↑ |
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
23 23 #
24 24 # Copyright 2010 Nexenta Systems, Inc. All rights reserved.
25 25 # Use is subject to license terms.
26 26 #
27 +# Copyright 2014 Andrew Stormont.
28 +#
27 29
28 30 LIBBASENAME= libc
29 31 LIBRARY= $(LIBBASENAME:%=%.a)
30 32 VERS= .1
31 33
32 34 # Note that we build libc_pic.a for the benefit of building
33 35 # ld.so.1, but we do not install it. Only ld.so.1 needs it
34 36 # and it must be built in the same workspace as libc.
35 37 LIB_PIC= libc_pic.a
36 38
37 39 ROOTLIB= $(ROOT)/usr/lib
38 40 ROOTFS_LIB= $(ROOT)/lib
39 41 ROOTLIB64= $(ROOTLIB)/$(MACH64)
40 42 ROOTFS_LIB64= $(ROOTFS_LIB)/$(MACH64)
41 43
42 44 ROOTVARIANTDIR= $(ROOTLIB)/libc
43 45 ROOTVARIANTDIR64= $(ROOTLIB64)/libc
44 46
45 47 ROOTFS_LINTDIR= $(ROOTFS_LIB)
46 48 ROOTFS_LINTDIR64= $(ROOTFS_LIB64)
47 49 ROOTFS_LINTLIB= $(ROOTFS_LINTDIR)/$(LINTLIB)
48 50 ROOTFS_LINTLIB64= $(ROOTFS_LINTDIR64)/$(LINTLIB)
49 51
50 52 # include common library definitions
51 53 include ../Makefile.lib
52 54
53 55 #
54 56 # on some architectures, we build multiple libc variants
55 57 #
56 58 VAR1 = hwcap1
57 59 VAR2 = hwcap2
58 60 VAR3 = hwcap3
59 61
60 62 VARBLD_1= $(MACH:sparc=sparc)
61 63 VARBLD= $(VARBLD_1:i386=)
62 64
63 65 VARBLD64_1= $(MACH:sparc=sparcv9)
64 66 VARBLD64= $(VARBLD64_1:i386=)
65 67
66 68 VAR1_DYNLIB = $(LIBRARY:%.a=%_$(VAR1).so$(VERS))
67 69 VAR1_BLDDIR = $(MACH)_$(VAR1)/$(VARBLD)
68 70 VAR2_DYNLIB = $(LIBRARY:%.a=%_$(VAR2).so$(VERS))
69 71 VAR2_BLDDIR = $(MACH)_$(VAR2)/$(VARBLD)
70 72 VAR3_DYNLIB = $(LIBRARY:%.a=%_$(VAR3).so$(VERS))
71 73 VAR3_BLDDIR = $(MACH)_$(VAR3)/$(VARBLD)
72 74
73 75 VAR1_DYNLIB64 = $(LIBRARY:%.a=%_$(VAR1).so$(VERS))
74 76 VAR1_BLDDIR64 = $(MACH)_$(VAR1)/$(VARBLD64)
75 77
76 78 i386_VARIANTS= $(VAR1) $(VAR2) $(VAR3)
77 79 sparc_VARIANTS=
78 80 sparcv9_VARIANTS=
79 81
80 82 i386_COMP=
81 83 sparc_COMP= capabilities
82 84
83 85 MACH_COMP= $($(MACH)_COMP)
84 86
85 87 i386_ETC= $(MACH)/etc
86 88 sparc_ETC=
87 89
88 90 VARIANTS= $($(MACH)_VARIANTS)
89 91 VARIANT_SUBDIRS = $(VARIANTS:%=$(MACH)_%/$(VARBLD))
90 92
91 93 VARIANTS64= $($(MACH64)_VARIANTS)
92 94 VARIANT_SUBDIRS64 = $(VARIANTS64:%=$(MACH)_%/$(VARBLD64))
93 95
94 96 SUBDIRS= $(MACH_CAP) $(MACH) $(MACH_ETC) $(VARIANT_SUBDIRS)
95 97 $(BUILD64)SUBDIRS += $(MACH64) $(VARIANT_SUBDIRS64)
96 98
97 99 LIBS = $(DYNLIB) $(LINTLIB)
98 100
99 101 ROOTLIBS64= $(ROOTLIBDIR64)/$(DYNLIB) $(ROOTLIBDIR64)/$(LINTLIB)
100 102 MACHLIBS64= $(MACH64)/$(DYNLIB) $(MACH64)/$(LINTLIB)
101 103 VARIANTLIBS= $(VARIANTS:%=$(MACH)_%/$(VARBLD)/$(LIBBASENAME)_%.so.1)
102 104 VARIANTLIBS64= $(VARIANTS64:%=$(MACH)_%/$(VARBLD64)/$(LIBBASENAME)_%.so.1)
103 105 ROOTVARIANTLIBS= $(VARIANTS:%=$(ROOTVARIANTDIR)/$(LIBBASENAME)_%.so.1)
104 106 ROOTVARIANTLIBS64= $(VARIANTS64:%=$(ROOTVARIANTDIR64)/$(LIBBASENAME)_%.so.1)
105 107
106 108 # definitions for install_h target
107 109 BASEHDRS= getxby_door.h
108 110 CHECKHDRS= $(BASEHDRS:%.h=port/gen/%.check)
109 111 HDRS= $(BASEHDRS)
110 112
111 113 CLOBBERFILES += THIRDPARTYLICENSE extract-copyright
112 114
113 115 # install rules for install_h target
114 116 $(ROOTHDRDIR)/%: port/gen/%
115 117 $(INS.file)
116 118
117 119 $(ROOTLIBDIR)/$(DYNLIB) := FILEMODE = 755
118 120 $(ROOTLIBDIR64)/$(DYNLIB) := FILEMODE = 755
119 121 $(ROOTFS_LIBDIR)/$(DYNLIB) := FILEMODE = 755
120 122 $(ROOTFS_LIBDIR64)/$(DYNLIB) := FILEMODE = 755
121 123
↓ open down ↓ |
85 lines elided |
↑ open up ↑ |
122 124 $(ROOTVARIANTDIR) := FILEMODE= 755
123 125 $(ROOTVARIANTDIR)/$(VAR1_DYNLIB) := FILEMODE= 755
124 126 $(ROOTVARIANTDIR)/$(VAR2_DYNLIB) := FILEMODE= 755
125 127 $(ROOTVARIANTDIR)/$(VAR3_DYNLIB) := FILEMODE= 755
126 128
127 129 $(ROOTVARIANTDIR64) := FILEMODE= 755
128 130 $(ROOTVARIANTDIR64)/$(VAR1_DYNLIB64) := FILEMODE= 755
129 131
130 132 .KEEP_STATE:
131 133
132 -all: all_h lib32 $(BUILD64) .WAIT lib64 .WAIT etc THIRDPARTYLICENSE
134 +all: all_h lib .WAIT etc THIRDPARTYLICENSE
133 135
134 136 THIRDPARTYLICENSE: extract-copyright
135 137 $(RM) $@
136 138 ./extract-copyright . > $@
137 139
138 140 etc: $($(MACH)_ETC)
139 141
140 142 lib32: $(MACH_COMP) $(MACHLIBS) $(MACH)/$(LIB_PIC) $(VARIANTLIBS)
141 143 @if $(ELFDUMP) -r $(MACH)/$(DYNLIB) | $(GREP) -w environ ; then \
142 144 $(ECHO) "Error: Invalid reference to environ" ; \
143 145 $(ECHO) "Error: See comments in port/gen/env_data.c" ; \
↓ open down ↓ |
1 lines elided |
↑ open up ↑ |
144 146 exit 1; \
145 147 fi
146 148
147 149 lib64: $(MACH_COMP) $(MACHLIBS64) $(MACH64)/$(LIB_PIC) $(VARIANTLIBS64)
148 150 @if $(ELFDUMP) -r $(MACH64)/$(DYNLIB) | $(GREP) -w environ ; then \
149 151 $(ECHO) "Error: Invalid reference to environ" ; \
150 152 $(ECHO) "Error: See comments in port/gen/env_data.c" ; \
151 153 exit 1; \
152 154 fi
153 155
156 +lib: lib32 $(BUILD64) .WAIT lib64
157 +
154 158 $(MACH)/assym.h $(MACH64)/assym.h:
155 159 @cd $(@D); $(MAKE) assym.h
156 160
157 161 $(VARIANTLIBS): FRC
158 162 @cd $(@D); pwd; VERSION='$(VERSION)' $(MAKE) $(@F)
159 163
160 164 $(VARIANTLIBS64): FRC
161 165 @cd $(@D); pwd; VERSION='$(VERSION)' $(MAKE) $(@F)
162 166
163 167 $($(MACH)_ETC): FRC
164 168 @cd $(@); pwd; $(MAKE) $(TARGET)
165 169
166 170 $($(MACH)_COMP): FRC
167 171 @cd $(@); pwd; $(MAKE) $(TARGET)
168 172
169 -install: all \
170 - etc \
171 - inslib32 \
172 - $(BUILD64) inslib64
173 +install: all etc inslib
173 174
174 175 inslib32: $(ROOTFS_LIBS) $(ROOTFS_LINKS) $(ROOTFS_LINT) \
175 176 $(ROOTFS_LINTLIB) \
176 177 $(ROOTVARIANTLIBS)
177 178
178 179 inslib64: $(ROOTFS_LIBS64) $(ROOTFS_LINKS64) \
179 180 $(ROOTFS_LINTLIB64) \
180 181 $(ROOTVARIANTLIBS64)
181 182
183 +inslib: inslib32 $(BUILD64) inslib64
184 +
182 185 install_h: all_h $(ROOTHDRS)
183 186
184 -all_h: $(MACH)/assym.h $(MACH64)/assym.h
187 +all_h: $(MACH)/assym.h $(BUILD64) $(MACH64)/assym.h
185 188
186 189 check: $(CHECKHDRS)
187 190
188 191 $(ROOTFS_LIB)/%: $(MACH)/%
189 192 $(INS.file)
190 193 $(ROOTFS_LIBDIR)/$(LIBLINKS): $(ROOTFS_LIBDIR)/$(LIBLINKS)$(VERS)
191 194 $(INS.liblink)
192 195 $(ROOTFS_LIB64)/%: $(MACH64)/%
193 196 $(INS.file)
194 197 $(ROOTFS_LIBDIR64)/$(LIBLINKS): $(ROOTFS_LIBDIR64)/$(LIBLINKS)$(VERS)
195 198 $(INS.liblink)
196 199
197 200 $(ROOTVARIANTDIR): $(ROOTLIB)
198 201 $(INS.dir)
199 202 $(ROOTVARIANTDIR)/%: $(ROOTVARIANTDIR) $(VAR1_BLDDIR)/%
200 203 $(INS.file)
201 204 $(ROOTVARIANTDIR)/%: $(ROOTVARIANTDIR) $(VAR2_BLDDIR)/%
202 205 $(INS.file)
203 206 $(ROOTVARIANTDIR)/%: $(ROOTVARIANTDIR) $(VAR3_BLDDIR)/%
204 207 $(INS.file)
205 208
206 209 $(ROOTVARIANTDIR64): $(ROOTLIB64)
207 210 $(INS.dir)
208 211 $(ROOTVARIANTDIR64)/%: $(ROOTVARIANTDIR64) $(VAR1_BLDDIR64)/%
209 212 $(INS.file)
210 213
211 214 # install rule for lint library target
212 215 $(ROOTFS_LINTDIR)/%: port/%
213 216 $(INS.file)
214 217 $(ROOTFS_LINTDIR64)/%: port/%
215 218 $(INS.file)
216 219 $(ROOTFS_LINTDIR)/%: $(MACH)/%
217 220 $(INS.file)
218 221 $(ROOTFS_LINTDIR64)/%: $(MACH64)/%
219 222 $(INS.file)
220 223
221 224 $(LINTLIB):
222 225 @cd $(MACH); pwd; VERSION='$(VERSION)' $(MAKE) $@
223 226 $(LINTLIB64):
224 227 @cd $(MACH64); pwd; VERSION='$(VERSION)' $(MAKE) $@
225 228
226 229 $(MACH)/$(LIB_PIC): FRC
227 230 @cd $(MACH); pwd; VERSION='$(VERSION)' $(MAKE) $(LIB_PIC)
228 231 $(MACH64)/$(LIB_PIC): FRC
229 232 @cd $(MACH64); pwd; VERSION='$(VERSION)' $(MAKE) $(LIB_PIC)
230 233
231 234 all := TARGET= all
232 235 install := TARGET= install
233 236 clean := TARGET= clean
234 237 clobber := TARGET= clobber
235 238 lint := TARGET= lint
236 239
237 240 .PARALLEL: $(SUBDIRS)
238 241
239 242 $(SUBDIRS): FRC
240 243 @cd $@; pwd; VERSION='$(VERSION)' $(MAKE) $(TARGET)
241 244
242 245 clean: $(SUBDIRS)
243 246 clobber: $(SUBDIRS) etc clobber_local
244 247 clobber_local:
245 248 $(RM) $(CLOBBERFILES)
246 249
247 250 lint: $(SUBDIRS)
248 251
249 252 _msg: $(MSGDOMAIN) catalog
250 253
251 254 catalog:
252 255 sh ./makelibccatalog.sh $(MSGDOMAIN)
253 256
254 257 $(MSGDOMAIN):
255 258 $(INS.dir)
256 259
257 260 cscope.out tags: FRC
258 261 $(XREF) -x $@
259 262
260 263 FRC:
261 264 # include MACH-specific library targets
262 265 include ../Makefile.mach
↓ open down ↓ |
68 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX