xref: /titanic_51/usr/src/cmd/sgs/libld/Makefile.targ (revision 5c46c6a053defc1bf25f2e08df2653bc7717ed0b)
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 2006 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29pics/%.o:	../common/%.c
30		$(COMPILE.c) -o $@ $<
31		$(POST_PROCESS_O)
32
33pics/%32.o:	../common/%.c
34		$(COMPILE.c) -o $@ $(ELFTARGET32) $<
35		$(POST_PROCESS_O)
36
37pics/%64.o:	../common/%.c
38		$(COMPILE.c) -o $@ $(ELFTARGET64) -D_ELF64 $<
39		$(POST_PROCESS_O)
40
41pics/%32.o:	%.c
42		$(COMPILE.c) -o $@ $(ELFTARGET32) $<
43		$(POST_PROCESS_O)
44
45pics/%64.o:	%.c
46		$(COMPILE.c) -o $@ $(ELFTARGET64) -D_ELF64 $<
47		$(POST_PROCESS_O)
48
49pics/%.o:	$(SGSTOOLS)/common/%.c
50		$(COMPILE.c) -o $@ $<
51		$(POST_PROCESS_O)
52
53pics/%.o:	$(VAR_AVLDIR)/%.c
54		$(COMPILE.c) -o $@ $<
55		$(POST_PROCESS_O)
56
57#pics/%32.o:	$(SRCBASE)/uts/$(PLAT)/krtld/%.c
58#		$(COMPILE.c) -o $@ $(ELFTARGET32) $<
59#		$(POST_PROCESS_O)
60#
61#pics/%64.o:	$(SRCBASE)/uts/$(PLAT)/krtld/%.c
62#		$(COMPILE.c) -o $@ $(ELFTARGET64) -D_ELF64 $<
63#		$(POST_PROCESS_O)
64
65pics/elfcap.o:	$(ELFCAP)/elfcap.c
66		$(COMPILE.c) -o  $@ -DCAP_LOWERCASE $(ELFCAP)/elfcap.c
67		$(POST_PROCESS_O)
68
69$(DYNLIB):	$(MAPFILES)
70
71$(LIBLINKS):
72		$(RM) $@; $(SYMLINK) $(DYNLIB) $@
73
74delete:
75		$(RM) $(DYNLIB)
76
77.PARALLEL:	$(LINTOUT32) $(LINTOUT64) $(LINTLIB32) $(LINTLIB64)
78
79lint:		$(LINTLIB32) $(LINTOUT32) $(LINTLIB64) $(LINTOUT64) \
80		    .WAIT $(SGSLINTOUT)
81
82# Special target for native builds (ie. when we need to build a version of ld
83# to build a version of ld :-).
84
85native:		$(SGSPROTO)/$(DYNLIB)
86
87$(SGSPROTO)/$(DYNLIB): \
88		pics .WAIT $$(PICS) $(MAPFILES)
89		$(BUILD.SO)
90		$(POST_PROCESS_SO)
91		@$(RM) $(SGSPROTO)/$(LIBLINKS)
92		$(SYMLINK) $(DYNLIB) $(SGSPROTO)/$(LIBLINKS)
93
94include		$(SRC)/lib/Makefile.targ
95include		$(SRC)/cmd/sgs/Makefile.targ
96
97# Derived source and header files (messaging).
98
99catalog:	$(BLTMESG)
100
101chkmsg:		$(LIBSRCS) $(CHKSRCS)
102		sh $(CHKMSG) $(CHKMSGFLAGS) $(LIBSRCS) $(CHKSRCS)
103
104$(BLTDEFS) + \
105$(BLTDATA):	$(SGSMSGTARG)
106		$(SGSMSG) $(SGSMSGFLAGS2) $(SGSMSGTARG)
107
108$(BLTMESG):	$(SGSMSGALL)
109		$(SGSMSG) $(SGSMSGFLAGS1) $(SGSMSGALL)
110