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