xref: /titanic_44/usr/src/cmd/sgs/rtld/Makefile.targ (revision 749f21d359d8fbd020c974a1a5227316221bfc9c)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29# Get rid of new compiler warnings
30pics/getcwd.o	:=	WARNFLAGS=-erroff=E_STATEMENT_NOT_REACHED
31
32# Don't generate separate sections for this module
33pics/debugdata.o :=	XFFLAG=
34
35# Since we use RTLD rather than DYNLIB, we must explicitly hook in ctfmerge.
36$(RTLD) :=	CTFMERGE_POST = $(CTFMERGE_LIB)
37
38pics/%.o:	%.s
39		$(BUILD.s)
40		$(POST_PROCESS_O)
41
42pics/%.o:	$(CRTSRCS)/%.s
43		$(BUILD.s)
44		$(POST_PROCESS_O)
45
46pics/%.o:	%.c
47		$(COMPILE.c) -o $@ $< $(WARNFLAGS)
48		$(POST_PROCESS_O)
49
50pics/%.o:	../common/%.c
51		$(COMPILE.c) -o $@ $<  $(WARNFLAGS)
52		$(POST_PROCESS_O)
53
54pics/%.o:	$(VAR_AVLDIR)/%.c
55		$(COMPILE.c) -o $@ $< $(WARNFLAGS)
56		$(POST_PROCESS_O)
57
58pics/%.o:	$(SGSTOOLS)/common/%.c
59		$(COMPILE.c) -o $@ $< $(WARNFLAGS)
60		$(POST_PROCESS_O)
61
62pics/%.o:	$(SRCBASE)/uts/$(PLAT)/krtld/%.c
63		$(COMPILE.c) -o $@ $<  $(WARNFLAGS)
64		$(POST_PROCESS_O)
65
66$(RTLD):	pics $(PICS) $(CRTS) $(MAPFILES)
67		$(SGSPROTO)/ld -o $@ -dy -G $(DYNFLAGS) $(CRTI) $(PICS) \
68		$(LDLIBS) $(CRTN)
69		$(POST_PROCESS_SO)
70
71delete:
72		-$(RM) $(RTLD)
73
74lint:		$(SGSLINTOUT)
75
76lint :=		CPICLIB=
77lint :=		CLIB=-lc
78
79$(ROOTFS_LIBDIR)/%:	%
80		$(INS.file)
81
82$(ETCLIBDIR)/%:		%
83		$(INS.file)
84
85include		$(SRC)/lib/Makefile.targ
86include		$(SRC)/cmd/sgs/Makefile.targ
87
88# Derived source and header files (messaging).
89
90catalog:	$(BLTMESG)
91
92chkmsg :=	SGSMSGCHK=../common/rtld.chk.msg
93
94chkmsg:		$(SRCS) $(CHKSRCS)
95		sh $(CHKMSG) $(CHKMSGFLAGS) $(SRCS) $(CHKSRCS)
96
97$(BLTDEFS) + \
98$(BLTDATA) :	$(SGSMSGTARG)
99		$(SGSMSG) $(SGSMSGFLAGS2) $(SGSMSGTARG)
100
101$(BLTMESG) :	$(SGSMSGALL)
102		$(SGSMSG) $(SGSMSGFLAGS1) $(SGSMSGALL)
103