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# 22e127a3e7Sraf# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 267c478bd9Sstevel@tonic-gate# 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gate# libc build rules 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate# 317c478bd9Sstevel@tonic-gate# This first rule picks up optimized sources for libc variants. 327c478bd9Sstevel@tonic-gate# 337c478bd9Sstevel@tonic-gatepics/%.o: $(OPTIMIZED_LIBCBASE)/gen/%.s 347c478bd9Sstevel@tonic-gate $(BUILD.s) 357c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/crt/%.c 387c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 397c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/crt/%.s 427c478bd9Sstevel@tonic-gate $(BUILD.s) 437c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 447c478bd9Sstevel@tonic-gate 457c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/gen/%.c 467c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 477c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 487c478bd9Sstevel@tonic-gate 497c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/gen/%.s 507c478bd9Sstevel@tonic-gate $(BUILD.s) 517c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 527c478bd9Sstevel@tonic-gate 537c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/gen/%.s 547c478bd9Sstevel@tonic-gate $(BUILD.s) 557c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gatepics/_stack_grow.o: $(LIBCBASE)/../$(TARGET_ARCH)/gen/_stack_grow.s 587c478bd9Sstevel@tonic-gate $(BUILD.s) $(LIBCBASE)/../$(TARGET_ARCH)/gen/_stack_grow.s 597c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 607c478bd9Sstevel@tonic-gate 617c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/fp/%.c 627c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 637c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(MACH)/fp/%.c 667c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 677c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/fp/%.s 707c478bd9Sstevel@tonic-gate $(BUILD.s) 717c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 727c478bd9Sstevel@tonic-gate 737c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/fp/%.c 747c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 757c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/fp/%.s 787c478bd9Sstevel@tonic-gate $(BUILD.s) 797c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/sys/%.c 827c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 837c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../common/sys/%.s 867c478bd9Sstevel@tonic-gate $(BUILD.s) 877c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/sys/%.s 907c478bd9Sstevel@tonic-gate $(BUILD.s) 917c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(MACH)/sys/%.s 947c478bd9Sstevel@tonic-gate $(BUILD.s) 957c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 967c478bd9Sstevel@tonic-gate 977c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/sys/%.c 987c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 997c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/sys/%.s 1027c478bd9Sstevel@tonic-gate $(BUILD.s) 1037c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1047c478bd9Sstevel@tonic-gate 1057c478bd9Sstevel@tonic-gate# rules to build large file aware objects (xxx64.o from xxx.s or xxx.c) 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gatepics/%64.o: $(LIBCBASE)/../common/sys/%.s 1087c478bd9Sstevel@tonic-gate $(BUILD.s) 1097c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1107c478bd9Sstevel@tonic-gate 1117c478bd9Sstevel@tonic-gatepics/%64.o: $(LIBCBASE)/sys/%.s 1127c478bd9Sstevel@tonic-gate $(BUILD.s) 1137c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1147c478bd9Sstevel@tonic-gate 1157c478bd9Sstevel@tonic-gatepics/%64.o: $(LIBCBASE)/gen/%.c 1167c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1177c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1187c478bd9Sstevel@tonic-gate 1197c478bd9Sstevel@tonic-gatepics/%64.o: $(LIBCBASE)/../port/gen/%.c 1207c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1217c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1227c478bd9Sstevel@tonic-gate 1237c478bd9Sstevel@tonic-gatepics/%64.o: $(LIBCBASE)/../port/sys/%.c 1247c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1257c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1267c478bd9Sstevel@tonic-gate 1277c478bd9Sstevel@tonic-gatepics/%64.o: $(LIBCBASE)/../port/print/%.c 1287c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1297c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1307c478bd9Sstevel@tonic-gate 1317c478bd9Sstevel@tonic-gatepics/%64.o: $(LIBCBASE)/../port/stdio/%.c 1327c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1337c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gatepics/%_w.o: $(LIBCBASE)/../port/stdio/%.c 1367c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1377c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1387c478bd9Sstevel@tonic-gate 1397c478bd9Sstevel@tonic-gatepics/%_w.o: $(LIBCBASE)/../port/print/%.c 1407c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1417c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1427c478bd9Sstevel@tonic-gate 1437c478bd9Sstevel@tonic-gatepics/%_pos.o: $(LIBCBASE)/../port/i18n/%.c 1447c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1457c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1467c478bd9Sstevel@tonic-gate 1477c478bd9Sstevel@tonic-gatepics/%_sbyte.o: $(LIBCBASE)/../port/i18n/%.c 1487c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1497c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1507c478bd9Sstevel@tonic-gate 1517c478bd9Sstevel@tonic-gatepics/%_possbyte.o: $(LIBCBASE)/../port/i18n/%.c 1527c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1537c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1547c478bd9Sstevel@tonic-gate 1557c478bd9Sstevel@tonic-gatepics/%_longlong.o: $(LIBCBASE)/../port/i18n/%.c 1567c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1577c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1587c478bd9Sstevel@tonic-gate 1597c478bd9Sstevel@tonic-gate# libc build rules for objects built from "portable" source in ../port 1607c478bd9Sstevel@tonic-gate 1617c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../port/fp/%.c 1627c478bd9Sstevel@tonic-gate $(COMPILE.c) \ 1637c478bd9Sstevel@tonic-gate -I$(LIBCBASE)/../port/fp -o $@ $< 1647c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1657c478bd9Sstevel@tonic-gate 1667c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../port/i18n/%.c 1677c478bd9Sstevel@tonic-gate $(COMPILE.c) \ 1687c478bd9Sstevel@tonic-gate -I$(LIBCBASE)/../port/i18n -o $@ $< 1697c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1707c478bd9Sstevel@tonic-gate 1717c478bd9Sstevel@tonic-gate# gen rules 1727c478bd9Sstevel@tonic-gatepics/%.o %.o: $(LIBCBASE)/../port/gen/%.c 1737c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1747c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1757c478bd9Sstevel@tonic-gate 1767c478bd9Sstevel@tonic-gate# print rules 1777c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../port/print/%.c 1787c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1797c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1807c478bd9Sstevel@tonic-gate 1817c478bd9Sstevel@tonic-gate# regex rules 1827c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../port/regex/%.c 1837c478bd9Sstevel@tonic-gate $(COMPILE.c) -DM_I18N_MB -DI18N \ 1847c478bd9Sstevel@tonic-gate -I$(LIBCBASE)/../port/regex \ 1857c478bd9Sstevel@tonic-gate -I$(LIBCBASE)/../port/gen -o $@ $< 1867c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1877c478bd9Sstevel@tonic-gate 1887c478bd9Sstevel@tonic-gate# stdio rules 1897c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../port/stdio/%.c 1907c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1917c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1927c478bd9Sstevel@tonic-gate 1937c478bd9Sstevel@tonic-gate# c89 print, stdio rules 1947c478bd9Sstevel@tonic-gatepics/%_c89.o: $(LIBCBASE)/../port/print/%.c 1957c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1967c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 1977c478bd9Sstevel@tonic-gate 1987c478bd9Sstevel@tonic-gatepics/%_c89.o: $(LIBCBASE)/../port/stdio/%.c 1997c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2007c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2017c478bd9Sstevel@tonic-gate 202f841f6adSraf# aio rules 203f841f6adSrafpics/%.o: $(LIBCBASE)/../port/aio/%.c 204f841f6adSraf $(COMPILE.c) -o $@ $< 205f841f6adSraf $(POST_PROCESS_O) 206f841f6adSraf 207f841f6adSraf# rt rules 208f841f6adSrafpics/%.o: $(LIBCBASE)/../port/rt/%.c 209f841f6adSraf $(COMPILE.c) -o $@ $< 210f841f6adSraf $(POST_PROCESS_O) 211f841f6adSraf 212f841f6adSraf# tpool rules 213f841f6adSrafpics/%.o: $(LIBCBASE)/../port/tpool/%.c 214f841f6adSraf $(COMPILE.c) -o $@ $< 215f841f6adSraf $(POST_PROCESS_O) 216f841f6adSraf 2177c478bd9Sstevel@tonic-gate# threads rules 2187c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../port/threads/%.c 2197c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2207c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2217c478bd9Sstevel@tonic-gate 2227c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/threads/%.c 2237c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2247c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2257c478bd9Sstevel@tonic-gate 2267c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/threads/%.s 2277c478bd9Sstevel@tonic-gate $(BUILD.s) 2287c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2297c478bd9Sstevel@tonic-gate 2307c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/threads/%.c 2317c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2327c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2337c478bd9Sstevel@tonic-gate 2347c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/threads/%.s 2357c478bd9Sstevel@tonic-gate $(BUILD.s) 2367c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2377c478bd9Sstevel@tonic-gate 2387c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/unwind/%.c 2397c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2407c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2417c478bd9Sstevel@tonic-gate 2427c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(TARGET_ARCH)/unwind/%.s 2437c478bd9Sstevel@tonic-gate $(BUILD.s) 2447c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2457c478bd9Sstevel@tonic-gate 2467c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../port/unwind/%.c 2477c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2487c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2497c478bd9Sstevel@tonic-gate 2507c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../$(MACH)/unwind/%.s 2517c478bd9Sstevel@tonic-gate $(BUILD.s) 2527c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2537c478bd9Sstevel@tonic-gate 2547c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../port/sys/%.c 2557c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2567c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2577c478bd9Sstevel@tonic-gate 2587c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/../../common/common/%.c 2597c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 2607c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2617c478bd9Sstevel@tonic-gate 2627c478bd9Sstevel@tonic-gatepics/%.o: $(LIBCBASE)/$(CRTSRCS)/%.s 2637c478bd9Sstevel@tonic-gate $(BUILD.s) 2647c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2657c478bd9Sstevel@tonic-gate 2667c478bd9Sstevel@tonic-gate# $(SRC)/common rules 267f808c858Srafpics/%.o: $(SRC)/common/atomic/$(TARGETMACH)/%.s 2687c478bd9Sstevel@tonic-gate $(BUILD.s) 2697c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2707c478bd9Sstevel@tonic-gate 2717c478bd9Sstevel@tonic-gate$(COMOBJS:%=pics/%): $(SRC)/common/util/$$(@F:.o=.c) 2727c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $(SRC)/common/util/$(@F:.o=.c) 2737c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2747c478bd9Sstevel@tonic-gate 275*da6c28aaSamw$(XATTROBJS:%=pics/%): $(SRC)/common/xattr/$$(@F:.o=.c) 276*da6c28aaSamw $(COMPILE.c) -o $@ $(SRC)/common/xattr/$(@F:.o=.c) 277*da6c28aaSamw $(POST_PROCESS_O) 278*da6c28aaSamw 279e127a3e7Sraf$(DTRACEOBJS:%=pics/%): $(SRC)/common/dtrace/$$(@F:.o=.c) 280e127a3e7Sraf $(COMPILE.c) -o $@ $(SRC)/common/dtrace/$(@F:.o=.c) 281e127a3e7Sraf $(POST_PROCESS_O) 282e127a3e7Sraf 2834703203dSis$(UNICODEOBJS:%=pics/%): $(SRC)/common/unicode/$$(@F:.o=.c) 2844703203dSis $(COMPILE.c) -o $@ $(SRC)/common/unicode/$(@F:.o=.c) 2854703203dSis $(POST_PROCESS_O) 2864703203dSis 287e127a3e7Sraf# DTrace rules 2887c478bd9Sstevel@tonic-gatepics/%.o: ../port/threads/%.d $(THREADSOBJS:%=pics/%) 2897c478bd9Sstevel@tonic-gate $(COMPILE.d) -C -xlazyload -s $< -o $@ $(THREADSOBJS:%=pics/%) 2907c478bd9Sstevel@tonic-gate $(POST_PROCESS_O) 2917c478bd9Sstevel@tonic-gate 2927c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/Makefile.targ 293