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