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.
7 #
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.
12 #
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]
18 #
19 # CDDL HEADER END
20 #
21 #
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
24 # Copyright 2016 Joyent, Inc.
25 #
26 #
27
28 # libc build rules
29
30 #
31 # This first rule picks up optimized sources for libc variants.
32 #
33 pics/%.o: $(OPTIMIZED_LIBCBASE)/gen/%.s
34 $(BUILD.s)
35 $(POST_PROCESS_O)
36
37 pics/%.o: $(LIBCBASE)/crt/%.c
38 $(COMPILE.c) -o $@ $<
39 $(POST_PROCESS_O)
40
41 pics/%.o: $(LIBCBASE)/crt/%.s
42 $(BUILD.s)
43 $(POST_PROCESS_O)
44
45 pics/%.o: $(LIBCBASE)/gen/%.c
46 $(COMPILE.c) -o $@ $<
47 $(POST_PROCESS_O)
48
49 pics/%.o: $(LIBCBASE)/gen/%.s
50 $(BUILD.s)
51 $(POST_PROCESS_O)
52
53 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/gen/%.s
54 $(BUILD.s)
55 $(POST_PROCESS_O)
56
57 pics/_stack_grow.o: $(LIBCBASE)/../$(TARGET_ARCH)/gen/_stack_grow.s
58 $(BUILD.s) $(LIBCBASE)/../$(TARGET_ARCH)/gen/_stack_grow.s
59 $(POST_PROCESS_O)
60
61 pics/%.o: $(LIBCBASE)/fp/%.c
62 $(COMPILE.c) -o $@ $<
63 $(POST_PROCESS_O)
64
65 pics/%.o: $(LIBCBASE)/../$(MACH)/fp/%.c
66 $(COMPILE.c) -o $@ $<
67 $(POST_PROCESS_O)
68
69 pics/%.o: $(LIBCBASE)/fp/%.s
70 $(BUILD.s)
71 $(POST_PROCESS_O)
72
73 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/fp/%.c
74 $(COMPILE.c) -o $@ $<
75 $(POST_PROCESS_O)
76
77 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/fp/%.s
78 $(BUILD.s)
79 $(POST_PROCESS_O)
80
81 pics/%.o: $(LIBCBASE)/sys/%.c
82 $(COMPILE.c) -o $@ $<
83 $(POST_PROCESS_O)
84
85 pics/%.o: $(LIBCBASE)/../common/sys/%.s
86 $(BUILD.s)
87 $(POST_PROCESS_O)
88
89 pics/%.o: $(LIBCBASE)/sys/%.s
90 $(BUILD.s)
91 $(POST_PROCESS_O)
92
93 pics/%.o: $(LIBCBASE)/../$(MACH)/sys/%.s
94 $(BUILD.s)
95 $(POST_PROCESS_O)
96
97 pics/%.o: $(LIBCBASE)/../$(MACH)/sys/%.c
98 $(COMPILE.c) -o $@ $<
99 $(POST_PROCESS_O)
100
101 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/sys/%.c
102 $(COMPILE.c) -o $@ $<
103 $(POST_PROCESS_O)
104
105 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/sys/%.s
106 $(BUILD.s)
107 $(POST_PROCESS_O)
108
109 # rules to build large file aware objects (xxx64.o from xxx.s or xxx.c)
110
111 pics/%64.o: $(LIBCBASE)/../common/sys/%.s
112 $(BUILD.s)
113 $(POST_PROCESS_O)
114
115 pics/%64.o: $(LIBCBASE)/sys/%.s
116 $(BUILD.s)
117 $(POST_PROCESS_O)
118
119 pics/%64.o: $(LIBCBASE)/gen/%.c
120 $(COMPILE.c) -o $@ $<
121 $(POST_PROCESS_O)
122
123 pics/%64.o: $(LIBCBASE)/../port/gen/%.c
124 $(COMPILE.c) -o $@ $<
125 $(POST_PROCESS_O)
126
127 pics/%64.o: $(LIBCBASE)/../port/sys/%.c
128 $(COMPILE.c) -o $@ $<
129 $(POST_PROCESS_O)
130
131 pics/%64.o: $(LIBCBASE)/../port/print/%.c
132 $(COMPILE.c) -o $@ $<
133 $(POST_PROCESS_O)
134
135 pics/%64.o: $(LIBCBASE)/../port/regex/%.c
136 $(COMPILE.c) -DM_I18N_MB -DI18N \
137 -I$(LIBCBASE)/../port/regex \
228 pics/%.o: $(LIBCBASE)/../port/rt/%.c
229 $(COMPILE.c) -o $@ $<
230 $(POST_PROCESS_O)
231
232 # tpool rules
233 pics/%.o: $(LIBCBASE)/../port/tpool/%.c
234 $(COMPILE.c) -o $@ $<
235 $(POST_PROCESS_O)
236
237 # threads rules
238 pics/%.o: $(LIBCBASE)/../port/threads/%.c
239 $(COMPILE.c) -o $@ $<
240 $(POST_PROCESS_O)
241
242 pics/%.o: $(LIBCBASE)/threads/%.c
243 $(COMPILE.c) -o $@ $<
244 $(POST_PROCESS_O)
245
246 pics/%.o: $(LIBCBASE)/threads/%.s
247 $(BUILD.s)
248 $(POST_PROCESS_O)
249
250 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/threads/%.c
251 $(COMPILE.c) -o $@ $<
252 $(POST_PROCESS_O)
253
254 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/threads/%.s
255 $(BUILD.s)
256 $(POST_PROCESS_O)
257
258 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/unwind/%.c
259 $(COMPILE.c) -o $@ $<
260 $(POST_PROCESS_O)
261
262 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/unwind/%.s
263 $(BUILD.s)
264 $(POST_PROCESS_O)
265
266 pics/%.o: $(LIBCBASE)/../port/unwind/%.c
267 $(COMPILE.c) -o $@ $<
268 $(POST_PROCESS_O)
269
270 pics/%.o: $(LIBCBASE)/../$(MACH)/unwind/%.s
271 $(BUILD.s)
272 $(POST_PROCESS_O)
273
274 pics/%.o: $(LIBCBASE)/../port/sys/%.c
275 $(COMPILE.c) -o $@ $<
276 $(POST_PROCESS_O)
277
278 pics/%.o: $(LIBCBASE)/../../crt/common/%.c
279 $(COMPILE.c) -o $@ $<
280 $(POST_PROCESS_O)
281
282 pics/%.o: $(LIBCBASE)/$(CRTSRCS)/%.s
283 $(BUILD.s)
284 $(POST_PROCESS_O)
285
286 # $(SRC)/common rules
287 pics/%.o: $(SRC)/common/atomic/$(TARGETMACH)/%.s
288 $(BUILD.s)
289 $(POST_PROCESS_O)
290
291 $(COMOBJS:%=pics/%): $(SRC)/common/util/$$(@F:.o=.c)
292 $(COMPILE.c) -o $@ $(SRC)/common/util/$(@F:.o=.c)
293 $(POST_PROCESS_O)
294
295 $(XATTROBJS:%=pics/%): $(SRC)/common/xattr/$$(@F:.o=.c)
296 $(COMPILE.c) -o $@ $(SRC)/common/xattr/$(@F:.o=.c)
297 $(POST_PROCESS_O)
298
299 $(DTRACEOBJS:%=pics/%): $(SRC)/common/dtrace/$$(@F:.o=.c)
300 $(COMPILE.c) -o $@ $(SRC)/common/dtrace/$(@F:.o=.c)
301 $(POST_PROCESS_O)
302
303 $(SECFLAGSOBJS:%=pics/%): $(SRC)/common/secflags/$$(@F:.o=.c)
304 $(COMPILE.c) -o $@ $(SRC)/common/secflags/$(@F:.o=.c)
305 $(POST_PROCESS_O)
306
307 $(UNICODEOBJS:%=pics/%): $(SRC)/common/unicode/$$(@F:.o=.c)
308 $(COMPILE.c) -o $@ $(SRC)/common/unicode/$(@F:.o=.c)
309 $(POST_PROCESS_O)
|
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.
7 #
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.
12 #
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]
18 #
19 # CDDL HEADER END
20 #
21 #
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
24 #
25 # Copyright (c) 2019, Joyent, Inc.
26 #
27
28 # libc build rules
29
30 #
31 # This first rule picks up optimized sources for libc variants.
32 #
33 pics/%.o: $(OPTIMIZED_LIBCBASE)/gen/%.s
34 $(BUILD.s)
35 $(POST_PROCESS_S_O)
36
37 pics/%.o: $(LIBCBASE)/crt/%.c
38 $(COMPILE.c) -o $@ $<
39 $(POST_PROCESS_O)
40
41 pics/%.o: $(LIBCBASE)/crt/%.s
42 $(BUILD.s)
43 $(POST_PROCESS_S_O)
44
45 pics/%.o: $(LIBCBASE)/gen/%.c
46 $(COMPILE.c) -o $@ $<
47 $(POST_PROCESS_O)
48
49 pics/%.o: $(LIBCBASE)/gen/%.s
50 $(BUILD.s)
51 $(POST_PROCESS_S_O)
52
53 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/gen/%.s
54 $(BUILD.s)
55 $(POST_PROCESS_S_O)
56
57 pics/_stack_grow.o: $(LIBCBASE)/../$(TARGET_ARCH)/gen/_stack_grow.s
58 $(BUILD.s) $(LIBCBASE)/../$(TARGET_ARCH)/gen/_stack_grow.s
59 $(POST_PROCESS_S_O)
60
61 pics/%.o: $(LIBCBASE)/fp/%.c
62 $(COMPILE.c) -o $@ $<
63 $(POST_PROCESS_O)
64
65 pics/%.o: $(LIBCBASE)/../$(MACH)/fp/%.c
66 $(COMPILE.c) -o $@ $<
67 $(POST_PROCESS_O)
68
69 pics/%.o: $(LIBCBASE)/fp/%.s
70 $(BUILD.s)
71 $(POST_PROCESS_S_O)
72
73 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/fp/%.c
74 $(COMPILE.c) -o $@ $<
75 $(POST_PROCESS_O)
76
77 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/fp/%.s
78 $(BUILD.s)
79 $(POST_PROCESS_S_O)
80
81 pics/%.o: $(LIBCBASE)/sys/%.c
82 $(COMPILE.c) -o $@ $<
83 $(POST_PROCESS_O)
84
85 pics/%.o: $(LIBCBASE)/../common/sys/%.s
86 $(BUILD.s)
87 $(POST_PROCESS_S_O)
88
89 pics/%.o: $(LIBCBASE)/sys/%.s
90 $(BUILD.s)
91 $(POST_PROCESS_S_O)
92
93 pics/%.o: $(LIBCBASE)/../$(MACH)/sys/%.s
94 $(BUILD.s)
95 $(POST_PROCESS_S_O)
96
97 pics/%.o: $(LIBCBASE)/../$(MACH)/sys/%.c
98 $(COMPILE.c) -o $@ $<
99 $(POST_PROCESS_O)
100
101 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/sys/%.c
102 $(COMPILE.c) -o $@ $<
103 $(POST_PROCESS_O)
104
105 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/sys/%.s
106 $(BUILD.s)
107 $(POST_PROCESS_S_O)
108
109 # rules to build large file aware objects (xxx64.o from xxx.s or xxx.c)
110
111 pics/%64.o: $(LIBCBASE)/../common/sys/%.s
112 $(BUILD.s)
113 $(POST_PROCESS_S_O)
114
115 pics/%64.o: $(LIBCBASE)/sys/%.s
116 $(BUILD.s)
117 $(POST_PROCESS_S_O)
118
119 pics/%64.o: $(LIBCBASE)/gen/%.c
120 $(COMPILE.c) -o $@ $<
121 $(POST_PROCESS_O)
122
123 pics/%64.o: $(LIBCBASE)/../port/gen/%.c
124 $(COMPILE.c) -o $@ $<
125 $(POST_PROCESS_O)
126
127 pics/%64.o: $(LIBCBASE)/../port/sys/%.c
128 $(COMPILE.c) -o $@ $<
129 $(POST_PROCESS_O)
130
131 pics/%64.o: $(LIBCBASE)/../port/print/%.c
132 $(COMPILE.c) -o $@ $<
133 $(POST_PROCESS_O)
134
135 pics/%64.o: $(LIBCBASE)/../port/regex/%.c
136 $(COMPILE.c) -DM_I18N_MB -DI18N \
137 -I$(LIBCBASE)/../port/regex \
228 pics/%.o: $(LIBCBASE)/../port/rt/%.c
229 $(COMPILE.c) -o $@ $<
230 $(POST_PROCESS_O)
231
232 # tpool rules
233 pics/%.o: $(LIBCBASE)/../port/tpool/%.c
234 $(COMPILE.c) -o $@ $<
235 $(POST_PROCESS_O)
236
237 # threads rules
238 pics/%.o: $(LIBCBASE)/../port/threads/%.c
239 $(COMPILE.c) -o $@ $<
240 $(POST_PROCESS_O)
241
242 pics/%.o: $(LIBCBASE)/threads/%.c
243 $(COMPILE.c) -o $@ $<
244 $(POST_PROCESS_O)
245
246 pics/%.o: $(LIBCBASE)/threads/%.s
247 $(BUILD.s)
248 $(POST_PROCESS_S_O)
249
250 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/threads/%.c
251 $(COMPILE.c) -o $@ $<
252 $(POST_PROCESS_O)
253
254 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/threads/%.s
255 $(BUILD.s)
256 $(POST_PROCESS_S_O)
257
258 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/unwind/%.c
259 $(COMPILE.c) -o $@ $<
260 $(POST_PROCESS_O)
261
262 pics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/unwind/%.s
263 $(BUILD.s)
264 $(POST_PROCESS_S_O)
265
266 pics/%.o: $(LIBCBASE)/../port/unwind/%.c
267 $(COMPILE.c) -o $@ $<
268 $(POST_PROCESS_O)
269
270 pics/%.o: $(LIBCBASE)/../$(MACH)/unwind/%.s
271 $(BUILD.s)
272 $(POST_PROCESS_S_O)
273
274 pics/%.o: $(LIBCBASE)/../port/sys/%.c
275 $(COMPILE.c) -o $@ $<
276 $(POST_PROCESS_O)
277
278 pics/%.o: $(LIBCBASE)/../../crt/common/%.c
279 $(COMPILE.c) -o $@ $<
280 $(POST_PROCESS_O)
281
282 pics/%.o: $(LIBCBASE)/$(CRTSRCS)/%.s
283 $(BUILD.s)
284 $(POST_PROCESS_S_O)
285
286 # $(SRC)/common rules
287 pics/%.o: $(SRC)/common/atomic/$(TARGETMACH)/%.s
288 $(BUILD.s)
289 $(POST_PROCESS_S_O)
290
291 $(COMOBJS:%=pics/%): $(SRC)/common/util/$$(@F:.o=.c)
292 $(COMPILE.c) -o $@ $(SRC)/common/util/$(@F:.o=.c)
293 $(POST_PROCESS_O)
294
295 $(XATTROBJS:%=pics/%): $(SRC)/common/xattr/$$(@F:.o=.c)
296 $(COMPILE.c) -o $@ $(SRC)/common/xattr/$(@F:.o=.c)
297 $(POST_PROCESS_O)
298
299 $(DTRACEOBJS:%=pics/%): $(SRC)/common/dtrace/$$(@F:.o=.c)
300 $(COMPILE.c) -o $@ $(SRC)/common/dtrace/$(@F:.o=.c)
301 $(POST_PROCESS_O)
302
303 $(SECFLAGSOBJS:%=pics/%): $(SRC)/common/secflags/$$(@F:.o=.c)
304 $(COMPILE.c) -o $@ $(SRC)/common/secflags/$(@F:.o=.c)
305 $(POST_PROCESS_O)
306
307 $(UNICODEOBJS:%=pics/%): $(SRC)/common/unicode/$$(@F:.o=.c)
308 $(COMPILE.c) -o $@ $(SRC)/common/unicode/$(@F:.o=.c)
309 $(POST_PROCESS_O)
|