xref: /illumos-gate/usr/src/cmd/sgs/libelf/Makefile.targ.64 (revision 8c0b080c8ed055a259d8cd26b9f005211c6a9753)
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# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
24#
25
26objs/%.o \
27pics/%.o:	%.c
28		$(COMPILE.c) -o $@ $<
29		$(POST_PROCESS_O)
30
31objs/%64.o \
32pics/%64.o:	../common/%.c
33		$(COMPILE.c) -D_ELF64 -o $@ $<
34		$(POST_PROCESS_O)
35
36objs/%.o \
37pics/%.o:	../misc/%.c
38		$(COMPILE.c) -DELF -o $@ $<
39		$(POST_PROCESS_O)
40
41objs/%.o \
42pics/%.o:	../common/%.c
43		$(COMPILE.c) -o $@ $<
44		$(POST_PROCESS_O)
45
46all:		$(BLTSRCS) .WAIT $(LIBS) $(LIBLINKS)
47
48$(LIBLINKS):
49		$(RM) $(LIBLINKS)
50		$(SYMLINK) $(DYNLIB) $(LIBLINKS)
51
52CLOBBERFILES += $(LIBLINKS)
53
54# include common library targets
55#
56include		$(SRC)/lib/Makefile.targ
57
58xlate.c:	../common/xlate.m4
59		$(M4) < ../common/xlate.m4 > xlate.c
60
61xlate64.c:	../common/xlate64.m4
62		$(M4) < ../common/xlate64.m4 > xlate64.c
63
64objs/msg.o \
65pics/msg.o:	msg.c
66
67objs/error.o \
68pics/error.o:	msg.h
69
70objs/ar.o \
71pics/ar.o:	msg.h
72
73objs/xlate.o \
74pics/xlate.o:	xlate.c
75
76
77# Derived source and header files (messaging).  Make sure that the sgsmsg
78# command is constructed - libelf might not be built with the whole sgs.
79
80catalog:	$(BLTMESG)
81
82chkmsg:		$(LIBSRCS)
83		sh $(CHKMSG) $(CHKMSGFLAGS) $(LIBSRCS)
84
85$(BLTDEFS) + \
86$(BLTDATA):	$(SGSMSGTARG)
87		$(SGSMSG) $(SGSMSGFLAGS2) $(SGSMSGTARG)
88
89$(BLTMESG):	$(SGSMSGALL) xlate.c xlate64.c
90		$(SGSMSG) $(SGSMSGFLAGS1) $(SGSMSGALL)
91
92#
93# 64-bit overrides
94#
95include		$(SRC)/Makefile.master.64
96
97FRC:
98