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 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
30 # This first rule picks up optimized sources for libc variants.
32 pics/%.o: $(OPTIMIZED_LIBCBASE)/gen/%.s
36 pics/%.o: $(LIBCBASE)/crt/%.c
40 pics/%.o: $(LIBCBASE)/crt/%.s
44 pics/%.o: $(LIBCBASE)/gen/%.c
48 pics/%.o: $(LIBCBASE)/gen/%.s
52 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/gen/%.s
56 pics/_stack_grow.o: $(LIBCBASE)/../$(TARGET_ARCH)/gen/_stack_grow.s
57 $(BUILD.s) $(LIBCBASE)/../$(TARGET_ARCH)/gen/_stack_grow.s
60 pics/%.o: $(LIBCBASE)/fp/%.c
64 pics/%.o: $(LIBCBASE)/../$(MACH)/fp/%.c
68 pics/%.o: $(LIBCBASE)/fp/%.s
72 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/fp/%.c
76 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/fp/%.s
80 pics/%.o: $(LIBCBASE)/sys/%.c
84 pics/%.o: $(LIBCBASE)/../common/sys/%.s
88 pics/%.o: $(LIBCBASE)/sys/%.s
92 pics/%.o: $(LIBCBASE)/../$(MACH)/sys/%.s
96 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/sys/%.c
100 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/sys/%.s
104 # rules to build large file aware objects (xxx64.o from xxx.s or xxx.c)
106 pics/%64.o: $(LIBCBASE)/../common/sys/%.s
110 pics/%64.o: $(LIBCBASE)/sys/%.s
114 pics/%64.o: $(LIBCBASE)/gen/%.c
115 $(COMPILE.c) -o $@ $<
118 pics/%64.o: $(LIBCBASE)/../port/gen/%.c
119 $(COMPILE.c) -o $@ $<
122 pics/%64.o: $(LIBCBASE)/../port/sys/%.c
123 $(COMPILE.c) -o $@ $<
126 pics/%64.o: $(LIBCBASE)/../port/print/%.c
127 $(COMPILE.c) -o $@ $<
130 pics/%64.o: $(LIBCBASE)/../port/stdio/%.c
131 $(COMPILE.c) -o $@ $<
134 pics/%_w.o: $(LIBCBASE)/../port/stdio/%.c
135 $(COMPILE.c) -o $@ $<
138 pics/%_w.o: $(LIBCBASE)/../port/print/%.c
139 $(COMPILE.c) -o $@ $<
142 pics/%_pos.o: $(LIBCBASE)/../port/i18n/%.c
143 $(COMPILE.c) -o $@ $<
146 pics/%_sbyte.o: $(LIBCBASE)/../port/i18n/%.c
147 $(COMPILE.c) -o $@ $<
150 pics/%_possbyte.o: $(LIBCBASE)/../port/i18n/%.c
151 $(COMPILE.c) -o $@ $<
154 pics/%_longlong.o: $(LIBCBASE)/../port/i18n/%.c
155 $(COMPILE.c) -o $@ $<
158 # libc build rules for objects built from "portable" source in ../port
160 pics/%.o: $(LIBCBASE)/../port/fp/%.c
162 -I$(LIBCBASE)/../port/fp -o $@ $<
165 pics/%.o: $(LIBCBASE)/../port/i18n/%.c
167 -I$(LIBCBASE)/../port/i18n -o $@ $<
171 pics/%.o %.o: $(LIBCBASE)/../port/gen/%.c
172 $(COMPILE.c) -o $@ $<
176 pics/%.o %.o: $(LIBCBASE)/../port/locale/%.c
177 $(COMPILE.c) -o $@ $<
181 pics/%.o: $(LIBCBASE)/../port/print/%.c
182 $(COMPILE.c) -o $@ $<
186 pics/%.o: $(LIBCBASE)/../port/regex/%.c
187 $(COMPILE.c) -DM_I18N_MB -DI18N \
188 -I$(LIBCBASE)/../port/regex \
189 -I$(LIBCBASE)/../port/gen -o $@ $<
193 pics/%.o: $(LIBCBASE)/../port/stdio/%.c
194 $(COMPILE.c) -o $@ $<
197 # c89 print, stdio rules
198 pics/%_c89.o: $(LIBCBASE)/../port/print/%.c
199 $(COMPILE.c) -o $@ $<
202 pics/%_c89.o: $(LIBCBASE)/../port/stdio/%.c
203 $(COMPILE.c) -o $@ $<
207 pics/%.o: $(LIBCBASE)/../port/aio/%.c
208 $(COMPILE.c) -o $@ $<
212 pics/%.o: $(LIBCBASE)/../port/rt/%.c
213 $(COMPILE.c) -o $@ $<
217 pics/%.o: $(LIBCBASE)/../port/tpool/%.c
218 $(COMPILE.c) -o $@ $<
222 pics/%.o: $(LIBCBASE)/../port/threads/%.c
223 $(COMPILE.c) -o $@ $<
226 pics/%.o: $(LIBCBASE)/threads/%.c
227 $(COMPILE.c) -o $@ $<
230 pics/%.o: $(LIBCBASE)/threads/%.s
234 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/threads/%.c
235 $(COMPILE.c) -o $@ $<
238 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/threads/%.s
242 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/unwind/%.c
243 $(COMPILE.c) -o $@ $<
246 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/unwind/%.s
250 pics/%.o: $(LIBCBASE)/../port/unwind/%.c
251 $(COMPILE.c) -o $@ $<
254 pics/%.o: $(LIBCBASE)/../$(MACH)/unwind/%.s
258 pics/%.o: $(LIBCBASE)/../port/sys/%.c
259 $(COMPILE.c) -o $@ $<
262 pics/%.o: $(LIBCBASE)/../../common/common/%.c
263 $(COMPILE.c) -o $@ $<
266 pics/%.o: $(LIBCBASE)/$(CRTSRCS)/%.s
270 # $(SRC)/common rules
271 pics/%.o: $(SRC)/common/atomic/$(TARGETMACH)/%.s
275 $(COMOBJS:%=pics/%): $(SRC)/common/util/$$(@F:.o=.c)
276 $(COMPILE.c) -o $@ $(SRC)/common/util/$(@F:.o=.c)
279 $(XATTROBJS:%=pics/%): $(SRC)/common/xattr/$$(@F:.o=.c)
280 $(COMPILE.c) -o $@ $(SRC)/common/xattr/$(@F:.o=.c)
283 $(DTRACEOBJS:%=pics/%): $(SRC)/common/dtrace/$$(@F:.o=.c)
284 $(COMPILE.c) -o $@ $(SRC)/common/dtrace/$(@F:.o=.c)
287 $(UNICODEOBJS:%=pics/%): $(SRC)/common/unicode/$$(@F:.o=.c)
288 $(COMPILE.c) -o $@ $(SRC)/common/unicode/$(@F:.o=.c)
291 $(CHACHAOBJS:%=pics/%): $(SRC)/common/crypto/chacha/$$(@F:.o=.c)
292 $(COMPILE.c) -I$(SRC)/common/crypto/chacha -DKEYSTREAM_ONLY \
293 -o $@ $(SRC)/common/crypto/chacha/$(@F:.o=.c)
297 pics/%.o: $(LIBCBASE)/../port/threads/%.d $(THREADSOBJS:%=pics/%)
298 $(COMPILE.d) -C -xlazyload -s $< -o $@ $(THREADSOBJS:%=pics/%)
301 include $(SRC)/lib/Makefile.targ