17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5f841f6adSraf# Common Development and Distribution License (the "License"). 6f841f6adSraf# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 217c478bd9Sstevel@tonic-gate# 22*b1593d50SJason Beloro# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate# 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate# libc build rules 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate# 307c478bd9Sstevel@tonic-gate# This first rule picks up optimized sources for libc variants. 317c478bd9Sstevel@tonic-gate# 327c478bd9Sstevel@tonic-gatepics/%.o: $(OPTIMIZED_LIBCBASE)/gen/%.s 337c478bd9Sstevel@tonic-gate $(BUILD.s) 347c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/crt/%.c 377c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 387c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 397c478bd9Sstevel@tonic-gate 407c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/crt/%.s 417c478bd9Sstevel@tonic-gate $(BUILD.s) 427c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/gen/%.c 457c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 467c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 477c478bd9Sstevel@tonic-gate 487c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/gen/%.s 497c478bd9Sstevel@tonic-gate $(BUILD.s) 507c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 517c478bd9Sstevel@tonic-gate 527c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/gen/%.s 537c478bd9Sstevel@tonic-gate $(BUILD.s) 547c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gatepics/_stack_grow.o: $(LIBCBASE)/../$(TARGET_ARCH)/gen/_stack_grow.s 577c478bd9Sstevel@tonic-gate $(BUILD.s) $(LIBCBASE)/../$(TARGET_ARCH)/gen/_stack_grow.s 587c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 597c478bd9Sstevel@tonic-gate 607c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/fp/%.c 617c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 627c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 637c478bd9Sstevel@tonic-gate 647c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(MACH)/fp/%.c 657c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 667c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 677c478bd9Sstevel@tonic-gate 687c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/fp/%.s 697c478bd9Sstevel@tonic-gate $(BUILD.s) 707c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/fp/%.c 737c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 747c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/fp/%.s 777c478bd9Sstevel@tonic-gate $(BUILD.s) 787c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 797c478bd9Sstevel@tonic-gate 807c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/sys/%.c 817c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 827c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../common/sys/%.s 857c478bd9Sstevel@tonic-gate $(BUILD.s) 867c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 877c478bd9Sstevel@tonic-gate 887c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/sys/%.s 897c478bd9Sstevel@tonic-gate $(BUILD.s) 907c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(MACH)/sys/%.s 937c478bd9Sstevel@tonic-gate $(BUILD.s) 947c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/sys/%.c 977c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 987c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/sys/%.s 1017c478bd9Sstevel@tonic-gate $(BUILD.s) 1027c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1037c478bd9Sstevel@tonic-gate 1047c478bd9Sstevel@tonic-gate# rules to build large file aware objects (xxx64.o from xxx.s or xxx.c) 1057c478bd9Sstevel@tonic-gate 1067c478bd9Sstevel@tonic-gatepics/%64.o: $(LIBCBASE)/../common/sys/%.s 1077c478bd9Sstevel@tonic-gate $(BUILD.s) 1087c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gatepics/%64.o: $(LIBCBASE)/sys/%.s 1117c478bd9Sstevel@tonic-gate $(BUILD.s) 1127c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gatepics/%64.o: $(LIBCBASE)/gen/%.c 1157c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1167c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1177c478bd9Sstevel@tonic-gate 1187c478bd9Sstevel@tonic-gatepics/%64.o: $(LIBCBASE)/../port/gen/%.c 1197c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1207c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gatepics/%64.o: $(LIBCBASE)/../port/sys/%.c 1237c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1247c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1257c478bd9Sstevel@tonic-gate 1267c478bd9Sstevel@tonic-gatepics/%64.o: $(LIBCBASE)/../port/print/%.c 1277c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1287c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1297c478bd9Sstevel@tonic-gate 1307c478bd9Sstevel@tonic-gatepics/%64.o: $(LIBCBASE)/../port/stdio/%.c 1317c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1327c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1337c478bd9Sstevel@tonic-gate 1347c478bd9Sstevel@tonic-gatepics/%_w.o: $(LIBCBASE)/../port/stdio/%.c 1357c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1367c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1377c478bd9Sstevel@tonic-gate 1387c478bd9Sstevel@tonic-gatepics/%_w.o: $(LIBCBASE)/../port/print/%.c 1397c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1407c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1417c478bd9Sstevel@tonic-gate 1427c478bd9Sstevel@tonic-gatepics/%_pos.o: $(LIBCBASE)/../port/i18n/%.c 1437c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1447c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1457c478bd9Sstevel@tonic-gate 1467c478bd9Sstevel@tonic-gatepics/%_sbyte.o: $(LIBCBASE)/../port/i18n/%.c 1477c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1487c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1497c478bd9Sstevel@tonic-gate 1507c478bd9Sstevel@tonic-gatepics/%_possbyte.o: $(LIBCBASE)/../port/i18n/%.c 1517c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1527c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1537c478bd9Sstevel@tonic-gate 1547c478bd9Sstevel@tonic-gatepics/%_longlong.o: $(LIBCBASE)/../port/i18n/%.c 1557c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1567c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1577c478bd9Sstevel@tonic-gate 1587c478bd9Sstevel@tonic-gate# libc build rules for objects built from "portable" source in ../port 1597c478bd9Sstevel@tonic-gate 1607c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../port/fp/%.c 1617c478bd9Sstevel@tonic-gate $(COMPILE.c) \ 1627c478bd9Sstevel@tonic-gate -I$(LIBCBASE)/../port/fp -o $@ $< 1637c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1647c478bd9Sstevel@tonic-gate 1657c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../port/i18n/%.c 1667c478bd9Sstevel@tonic-gate $(COMPILE.c) \ 1677c478bd9Sstevel@tonic-gate -I$(LIBCBASE)/../port/i18n -o $@ $< 1687c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1697c478bd9Sstevel@tonic-gate 1707c478bd9Sstevel@tonic-gate# gen rules 1717c478bd9Sstevel@tonic-gatepics/%.o %.o: $(LIBCBASE)/../port/gen/%.c 1727c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1737c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1747c478bd9Sstevel@tonic-gate 1757c478bd9Sstevel@tonic-gate# print rules 1767c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../port/print/%.c 1777c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1787c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1797c478bd9Sstevel@tonic-gate 1807c478bd9Sstevel@tonic-gate# regex rules 1817c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../port/regex/%.c 1827c478bd9Sstevel@tonic-gate $(COMPILE.c) -DM_I18N_MB -DI18N \ 1837c478bd9Sstevel@tonic-gate -I$(LIBCBASE)/../port/regex \ 1847c478bd9Sstevel@tonic-gate -I$(LIBCBASE)/../port/gen -o $@ $< 1857c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1867c478bd9Sstevel@tonic-gate 1877c478bd9Sstevel@tonic-gate# stdio rules 1887c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../port/stdio/%.c 1897c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1907c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1917c478bd9Sstevel@tonic-gate 1927c478bd9Sstevel@tonic-gate# c89 print, stdio rules 1937c478bd9Sstevel@tonic-gatepics/%_c89.o: $(LIBCBASE)/../port/print/%.c 1947c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1957c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1967c478bd9Sstevel@tonic-gate 1977c478bd9Sstevel@tonic-gatepics/%_c89.o: $(LIBCBASE)/../port/stdio/%.c 1987c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1997c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2007c478bd9Sstevel@tonic-gate 201f841f6adSraf# aio rules 202f841f6adSrafpics/%.o: $(LIBCBASE)/../port/aio/%.c 203f841f6adSraf $(COMPILE.c) -o $@ $< 204f841f6adSraf $(POST_PROCESS_O) 205f841f6adSraf 206f841f6adSraf# rt rules 207f841f6adSrafpics/%.o: $(LIBCBASE)/../port/rt/%.c 208f841f6adSraf $(COMPILE.c) -o $@ $< 209f841f6adSraf $(POST_PROCESS_O) 210f841f6adSraf 211f841f6adSraf# tpool rules 212f841f6adSrafpics/%.o: $(LIBCBASE)/../port/tpool/%.c 213f841f6adSraf $(COMPILE.c) -o $@ $< 214f841f6adSraf $(POST_PROCESS_O) 215f841f6adSraf 2167c478bd9Sstevel@tonic-gate# threads rules 2177c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../port/threads/%.c 2187c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2197c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2207c478bd9Sstevel@tonic-gate 2217c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/threads/%.c 2227c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2237c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2247c478bd9Sstevel@tonic-gate 2257c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/threads/%.s 2267c478bd9Sstevel@tonic-gate $(BUILD.s) 2277c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2287c478bd9Sstevel@tonic-gate 2297c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/threads/%.c 2307c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2317c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2327c478bd9Sstevel@tonic-gate 2337c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/threads/%.s 2347c478bd9Sstevel@tonic-gate $(BUILD.s) 2357c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2367c478bd9Sstevel@tonic-gate 2377c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/unwind/%.c 2387c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2397c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2407c478bd9Sstevel@tonic-gate 2417c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/unwind/%.s 2427c478bd9Sstevel@tonic-gate $(BUILD.s) 2437c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2447c478bd9Sstevel@tonic-gate 2457c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../port/unwind/%.c 2467c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2477c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2487c478bd9Sstevel@tonic-gate 2497c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(MACH)/unwind/%.s 2507c478bd9Sstevel@tonic-gate $(BUILD.s) 2517c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2527c478bd9Sstevel@tonic-gate 2537c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../port/sys/%.c 2547c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2557c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2567c478bd9Sstevel@tonic-gate 2577c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../../common/common/%.c 2587c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2597c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2607c478bd9Sstevel@tonic-gate 2617c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/$(CRTSRCS)/%.s 2627c478bd9Sstevel@tonic-gate $(BUILD.s) 2637c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2647c478bd9Sstevel@tonic-gate 2657c478bd9Sstevel@tonic-gate# $(SRC)/common rules 266f808c858Srafpics/%.o: $(SRC)/common/atomic/$(TARGETMACH)/%.s 2677c478bd9Sstevel@tonic-gate $(BUILD.s) 2687c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2697c478bd9Sstevel@tonic-gate 2707c478bd9Sstevel@tonic-gate$(COMOBJS:%=pics/%): $(SRC)/common/util/$$(@F:.o=.c) 2717c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $(SRC)/common/util/$(@F:.o=.c) 2727c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2737c478bd9Sstevel@tonic-gate 274da6c28aaSamw$(XATTROBJS:%=pics/%): $(SRC)/common/xattr/$$(@F:.o=.c) 275da6c28aaSamw $(COMPILE.c) -o $@ $(SRC)/common/xattr/$(@F:.o=.c) 276da6c28aaSamw $(POST_PROCESS_O) 277da6c28aaSamw 278e127a3e7Sraf$(DTRACEOBJS:%=pics/%): $(SRC)/common/dtrace/$$(@F:.o=.c) 279e127a3e7Sraf $(COMPILE.c) -o $@ $(SRC)/common/dtrace/$(@F:.o=.c) 280e127a3e7Sraf $(POST_PROCESS_O) 281e127a3e7Sraf 2824703203dSis$(UNICODEOBJS:%=pics/%): $(SRC)/common/unicode/$$(@F:.o=.c) 2834703203dSis $(COMPILE.c) -o $@ $(SRC)/common/unicode/$(@F:.o=.c) 2844703203dSis $(POST_PROCESS_O) 2854703203dSis 286e127a3e7Sraf# DTrace rules 287*b1593d50SJason Beloropics/%.o: $(LIBCBASE)/../port/threads/%.d $(THREADSOBJS:%=pics/%) 2887c478bd9Sstevel@tonic-gate $(COMPILE.d) -C -xlazyload -s $< -o $@ $(THREADSOBJS:%=pics/%) 2897c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2907c478bd9Sstevel@tonic-gate 2917c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/Makefile.targ 292