1# 2# CDDL HEADER START 3# 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# 23# Copyright 2010 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. 27# 28# Copyright (c) 2019, Joyent, Inc. 29# 30 31# Since we use RTLD rather than DYNLIB, we must explicitly hook in ctfmerge. 32$(RTLD) := CTFMERGE_POST = $(CTFMERGE_LIB) 33 34pics/%.o: %.S 35 $(COMPILE.s) -o $@ $< 36 $(POST_PROCESS_S_O) 37 38pics/%.o: $(CRTSRCS)/%.s 39 $(COMPILE.s) -o $@ $< 40 $(POST_PROCESS_S_O) 41 42pics/%.o: $(CRTSRCS)/%.S 43 $(COMPILE.s) -o $@ $< 44 $(POST_PROCESS_S_O) 45 46pics/%.o: %.c 47 $(COMPILE.c) -o $@ $< 48 $(POST_PROCESS_O) 49 50pics/%.o: ../common/%.c 51 $(COMPILE.c) -o $@ $< 52 $(POST_PROCESS_O) 53 54pics/%.o: $(SRC)/common/avl/%.c 55 $(COMPILE.c) -o $@ $< 56 $(POST_PROCESS_O) 57 58pics/%.o: $(SRC)/common/dtrace/%.c 59 $(COMPILE.c) -o $@ $< 60 $(POST_PROCESS_O) 61 62pics/%.o: $(SGSCOMMON)/%.c 63 $(COMPILE.c) -o $@ $< 64 $(POST_PROCESS_O) 65 66pics/%.o: $(SRC)/uts/$(PLAT)/krtld/%.c 67 $(COMPILE.c) -o $@ $< 68 $(POST_PROCESS_O) 69 70pics/elfcap.o: $(ELFCAP)/elfcap.c 71 $(COMPILE.c) -o $@ $(ELFCAP)/elfcap.c 72 $(POST_PROCESS_O) 73 74$(RTLD): pics $(PICS) $(CRTS) 75 $(LD) -o $@ -dy $(GSHARED) $(DYNFLAGS) $(CRTI) $(PICS) \ 76 $(LDLIBS) $(CRTN) 77 $(POST_PROCESS_SO) 78 79$(ROOTFS_LIBDIR)/%: % 80 $(INS.file) 81 82$(ETCLIBDIR)/%: % 83 $(INS.file) 84 85include $(SRC)/lib/Makefile.targ 86 87# Derived source and header files (messaging). 88 89catalog: $(BLTMESG) 90 91chkmsg := SGSMSGCHK=../common/rtld.chk.msg 92 93chkmsg: $(SRCS) $(CHKSRCS) 94 sh $(CHKMSG) $(CHKMSGFLAGS) $(SRCS) $(CHKSRCS) 95 96$(BLTDEFS) + \ 97$(BLTDATA) : $(SGSMSGTARG) 98 $(SGSMSG) $(SGSMSGFLAGS2) $(SGSMSGTARG) 99 100$(BLTMESG) : $(SGSMSGALL) 101 $(SGSMSG) $(SGSMSGFLAGS1) $(SGSMSGALL) 102