xref: /illumos-gate/usr/src/cmd/sgs/libelf/Makefile.targ.64 (revision 98b45ebecf42e6d81a4aa85f88ffcc06af817f34)
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
62# include common library targets
63#
64include		$(SRC)/lib/Makefile.targ
65include		$(SRC)/cmd/sgs/Makefile.targ
66
67xlate.c:	../common/xlate.m4
68		$(M4) < ../common/xlate.m4 > xlate.c
69
70xlate64.c:	../common/xlate64.m4
71		$(M4) < ../common/xlate64.m4 > xlate64.c
72
73objs/msg.o \
74pics/msg.o:	msg.c
75
76objs/error.o \
77pics/error.o:	msg.h
78
79objs/ar.o \
80pics/ar.o:	msg.h
81
82objs/xlate.o \
83pics/xlate.o:	xlate.c
84
85
86# Derived source and header files (messaging).  Make sure that the sgsmsg
87# command is constructed - libelf might not be built with the whole sgs.
88
89catalog:	$(BLTMESG)
90
91chkmsg:		$(LIBSRCS)
92		sh $(CHKMSG) $(CHKMSGFLAGS) $(LIBSRCS)
93
94$(BLTDEFS) + \
95$(BLTDATA):	$(SGSMSG) $(SGSMSGTARG)
96		$(SGSMSG) $(SGSMSGFLAGS2) $(SGSMSGTARG)
97
98$(BLTMESG):	$(SGSMSG) $(SGSMSGALL) xlate.c xlate64.c
99		$(SGSMSG) $(SGSMSGFLAGS1) $(SGSMSGALL)
100
101$(SGSMSG):	FRC
102		@ cd $(SGSTOOLS)/$(MACH); pwd; $(MAKE) catalog
103		@ pwd
104
105#
106# 64-bit overrides
107#
108include ../../Makefile.sub.64
109
110FRC:
111