xref: /illumos-gate/usr/src/cmd/sgs/rtld/Makefile.targ (revision e4d060fb4c00d44cd578713eb9a921f594b733b8)
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# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25
26# Don't generate separate sections for this module
27pics/debugdata.o :=	XFFLAG=
28
29# Since we use RTLD rather than DYNLIB, we must explicitly hook in ctfmerge.
30$(RTLD) :=	CTFMERGE_POST = $(CTFMERGE_LIB)
31
32pics/%.o:	%.s
33		$(BUILD.s)
34		$(POST_PROCESS_O)
35
36pics/%.o:	$(CRTSRCS)/%.s
37		$(BUILD.s)
38		$(POST_PROCESS_O)
39
40pics/%.o:	%.c
41		$(COMPILE.c) -o $@ $<
42		$(POST_PROCESS_O)
43
44pics/%.o:	../common/%.c
45		$(COMPILE.c) -o $@ $<
46		$(POST_PROCESS_O)
47
48pics/%.o:	$(VAR_AVLDIR)/%.c
49		$(COMPILE.c) -o $@ $<
50		$(POST_PROCESS_O)
51
52pics/%.o:	$(VAR_DTRDIR)/%.c
53		$(COMPILE.c) -o $@ $<
54		$(POST_PROCESS_O)
55
56pics/%.o:	$(SGSTOOLS)/common/%.c
57		$(COMPILE.c) -o $@ $<
58		$(POST_PROCESS_O)
59
60pics/%.o:	$(SRCBASE)/uts/$(PLAT)/krtld/%.c
61		$(COMPILE.c) -o $@ $<
62		$(POST_PROCESS_O)
63
64$(RTLD):	pics $(PICS) $(CRTS)
65		$(SGSPROTO)/ld -o $@ -dy -G $(DYNFLAGS) $(CRTI) $(PICS) \
66		    $(LDLIBS) $(CRTN)
67		$(POST_PROCESS_SO)
68
69delete:
70		-$(RM) $(RTLD)
71
72lint:		$(SGSLINTOUT)
73
74lint :=		CPICLIB=
75lint :=		CLIB=-lc
76
77$(ROOTFS_LIBDIR)/%:	%
78		$(INS.file)
79
80$(ETCLIBDIR)/%:		%
81		$(INS.file)
82
83include		$(SRC)/lib/Makefile.targ
84include		$(SRC)/cmd/sgs/Makefile.targ
85
86# Derived source and header files (messaging).
87
88catalog:	$(BLTMESG)
89
90chkmsg :=	SGSMSGCHK=../common/rtld.chk.msg
91
92chkmsg:		$(SRCS) $(CHKSRCS)
93		sh $(CHKMSG) $(CHKMSGFLAGS) $(SRCS) $(CHKSRCS)
94
95$(BLTDEFS) + \
96$(BLTDATA) :	$(SGSMSGTARG)
97		$(SGSMSG) $(SGSMSGFLAGS2) $(SGSMSGTARG)
98
99$(BLTMESG) :	$(SGSMSGALL)
100		$(SGSMSG) $(SGSMSGFLAGS1) $(SGSMSGALL)
101