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
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.
13 # Copyright (c) 2015, Joyent, Inc.
17 # To help deal with the fact that libavl may not exist on the host system, we
18 # just build it in here. However, we must do so before we include the shared
23 include $(SRC)/lib/libctf/Makefile.shared.com
24 include ../../Makefile.ctf
27 # For some reason LDFLAGS doesn't seem to be taking effect at the
28 # moment. Therefore add what we need to LDLIBS for now.
31 -L$(ROOTONBLDLIBMACH) \
32 '-R$$ORIGIN/../../lib/$(MACH)' \
34 CPPFLAGS += -I$(SRC)/lib/libctf/common/ \
35 -I$(SRC)/lib/libdwarf/common/ \
37 -include ../../common/ctf_headers.h \
40 LDLIBS += -lc -lelf -ldwarf
46 install: all $(ROOTONBLDLIBMACH)/libctf.so.1 $(ROOTONBLDLIBMACH)/libctf.so
48 $(ROOTONBLDLIBMACH)/%: %
51 $(ROOTONBLDLIBMACH)/$(LIBLINKS): $(ROOTONBLDLIBMACH)/$(LIBLINKS)$(VERS)
55 # Just like with libdwarf, we can't actually add ctf to ourselves,
56 # because we're part of the tools for creating CTF.
58 $(DYNLIB) := CTFMERGE_POST= :
61 include $(SRC)/lib/Makefile.targ
62 include $(SRC)/lib/libctf/Makefile.shared.targ
65 pics/%.o: $(SRC)/common/avl/%.c