xref: /titanic_44/usr/src/cmd/sgs/libelf/Makefile.targ.64 (revision 56b8f71e3a910fbd2820f6841b40bfd85f9673c2)
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 (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
23#
24
25objs/%.o \
26pics/%.o:	%.c
27		$(COMPILE.c) -o $@ $<
28		$(POST_PROCESS_O)
29
30objs/%64.o \
31pics/%64.o:	../common/%.c
32		$(COMPILE.c) -D_ELF64 -o $@ $<
33		$(POST_PROCESS_O)
34
35objs/%.o \
36pics/%.o:	../misc/%.c
37		$(COMPILE.c) -DELF -o $@ $<
38		$(POST_PROCESS_O)
39
40objs/%.o \
41pics/%.o:	../common/%.c
42		$(COMPILE.c) -o $@ $<
43		$(POST_PROCESS_O)
44
45all:		$(BLTSRCS) .WAIT $(LIBS) $(LIBLINKS)
46
47install:	all .WAIT $(ROOTFS_LIBS64) $(ROOTFS_LINKS64) \
48		$(ROOTFS_LINTLIB64)
49
50lint:		$(LINTLIB) $(LINTOUT32) $(LINTOUT64) $(SGSLINTOUT)
51
52.PARALLEL:	$(LINTOUT32) $(LINTOUT64)
53
54
55delete:
56		$(RM) $(DYNLIB)
57
58$(LIBLINKS):
59		$(RM) $(LIBLINKS)
60		$(SYMLINK) $(DYNLIB) $(LIBLINKS)
61
62CLOBBERFILES += $(LIBLINKS)
63
64# include common library targets
65#
66include		$(SRC)/lib/Makefile.targ
67include		$(SRC)/cmd/sgs/Makefile.targ
68
69xlate.c:	../common/xlate.m4
70		$(M4) < ../common/xlate.m4 > xlate.c
71
72xlate64.c:	../common/xlate64.m4
73		$(M4) < ../common/xlate64.m4 > xlate64.c
74
75objs/msg.o \
76pics/msg.o:	msg.c
77
78objs/error.o \
79pics/error.o:	msg.h
80
81objs/ar.o \
82pics/ar.o:	msg.h
83
84objs/xlate.o \
85pics/xlate.o:	xlate.c
86
87
88# Derived source and header files (messaging).  Make sure that the sgsmsg
89# command is constructed - libelf might not be built with the whole sgs.
90
91catalog:	$(BLTMESG)
92
93chkmsg:		$(LIBSRCS)
94		sh $(CHKMSG) $(CHKMSGFLAGS) $(LIBSRCS)
95
96$(BLTDEFS) + \
97$(BLTDATA):	$(SGSMSG) $(SGSMSGTARG)
98		$(SGSMSG) $(SGSMSGFLAGS2) $(SGSMSGTARG)
99
100$(BLTMESG):	$(SGSMSG) $(SGSMSGALL) xlate.c xlate64.c
101		$(SGSMSG) $(SGSMSGFLAGS1) $(SGSMSGALL)
102
103$(SGSMSG):	FRC
104		@ cd $(SGSTOOLS)/$(MACH); pwd; $(MAKE) catalog
105		@ pwd
106
107#
108# 64-bit overrides
109#
110include ../../Makefile.sub.64
111
112FRC:
113