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