xref: /illumos-gate/usr/src/tools/ctf/libctf/Makefile.com (revision a92282e44f968185a6bba094d1e5fece2da819cf)
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)
20C99LMODE = -Xc99=%all
21
22CPPFLAGS +=	-I$(SRC)/lib/libctf/common/ \
23		-I$(SRC)/lib/libdwarf/common/ \
24		-I$(SRC)/lib/mergeq \
25		-include ../../common/ctf_headers.h \
26		-DCTF_OLD_VERSIONS \
27		-DCTF_TOOLS_BUILD
28LDLIBS += -lc -lelf -L$(ROOTONBLDLIBMACH) -ldwarf -lavl
29NATIVE_LIBS += libelf.so libavl.so libc.so
30DYNFLAGS += '-R$$ORIGIN/../../lib/$(MACH)'
31
32.KEEP_STATE:
33
34all: $(LIBS)
35
36install: all $(ROOTONBLDLIBMACH)/libctf.so.1 $(ROOTONBLDLIBMACH)/libctf.so
37
38$(ROOTONBLDLIBMACH)/%: %
39	$(INS.file)
40
41$(ROOTONBLDLIBMACH)/$(LIBLINKS): $(ROOTONBLDLIBMACH)/$(LIBLINKS)$(VERS)
42	$(INS.liblink)
43
44#
45# Just like with libdwarf, we can't actually add ctf to ourselves,
46# because we're part of the tools for creating CTF.
47#
48$(DYNLIB) := CTFMERGE_POST= :
49CTFCONVERT_O= :
50
51include $(SRC)/lib/Makefile.targ
52include $(SRC)/lib/libctf/Makefile.shared.targ
53