xref: /illumos-gate/usr/src/tools/ctf/libctf/Makefile.com (revision 6446bd46ed1b4e9f69da153665f82181ccaedad5)
1#
2# This file and its contents are supplied under the terms of the
3# Common Development and Distribution License ("CDDL"), version 1.0.
4# You may only use this file in accordance with the terms of version
5# 1.0 of the CDDL.
6#
7# A full copy of the text of the CDDL should have accompanied this
8# source.  A copy of the CDDL is also available via the Internet at
9# http://www.illumos.org/license/CDDL.
10#
11
12#
13# Copyright 2018 Joyent, Inc.
14#
15
16include $(SRC)/lib/libctf/Makefile.shared.com
17include ../../Makefile.ctf
18
19CSTD = $(CSTD_GNU99)
20
21CPPFLAGS +=	-I$(SRC)/lib/libctf/common/ \
22		-I$(SRC)/lib/libdwarf/common/ \
23		-I$(SRC)/lib/mergeq \
24		-include ../../common/ctf_headers.h \
25		-DCTF_OLD_VERSIONS \
26		-DCTF_TOOLS_BUILD
27LDLIBS += -lc -lelf -L$(ROOTONBLDLIBMACH) -ldwarf -lavl
28NATIVE_LIBS += libelf.so libavl.so libc.so
29DYNFLAGS += '-R$$ORIGIN/../../lib/$(MACH)'
30
31# As a bootstrapping issue, we can't use the real mapfile because we build
32# early in tools and thus don't have support for assertions.
33MAPFILES=
34
35.KEEP_STATE:
36
37all: $(LIBS)
38
39install: all $(ROOTONBLDLIBMACH)/libctf.so.1 $(ROOTONBLDLIBMACH)/libctf.so
40
41$(ROOTONBLDLIBMACH)/%: %
42	$(INS.file)
43
44$(ROOTONBLDLIBMACH)/$(LIBLINKS): $(ROOTONBLDLIBMACH)/$(LIBLINKS)$(VERS)
45	$(INS.liblink)
46
47#
48# Just like with libdwarf, we can't actually add ctf to ourselves,
49# because we're part of the tools for creating CTF.
50#
51$(DYNLIB) := CTFMERGE_POST= :
52CTFCONVERT_O= :
53
54include $(SRC)/lib/Makefile.targ
55include $(SRC)/lib/libctf/Makefile.shared.targ
56