xref: /illumos-gate/usr/src/tools/ctf/ctfdump/Makefile.com (revision 1e8d79d21400b4e47d64ce367181e7e5ce992649)
1bc1f688bSRobert Mustacchi#
2bc1f688bSRobert Mustacchi# This file and its contents are supplied under the terms of the
3bc1f688bSRobert Mustacchi# Common Development and Distribution License ("CDDL"), version 1.0.
4bc1f688bSRobert Mustacchi# You may only use this file in accordance with the terms of version
5bc1f688bSRobert Mustacchi# 1.0 of the CDDL.
6bc1f688bSRobert Mustacchi#
7bc1f688bSRobert Mustacchi# A full copy of the text of the CDDL should have accompanied this
8bc1f688bSRobert Mustacchi# source.  A copy of the CDDL is also available via the Internet at
9bc1f688bSRobert Mustacchi# http://www.illumos.org/license/CDDL.
10bc1f688bSRobert Mustacchi#
11bc1f688bSRobert Mustacchi# Copyright 2018 Joyent, Inc.
12bc1f688bSRobert Mustacchi
13bc1f688bSRobert MustacchiPROG = ctfdump
14bc1f688bSRobert MustacchiSRCS = ctfdump.c
15bc1f688bSRobert Mustacchi
16bc1f688bSRobert Mustacchiinclude ../../Makefile.ctf
17bc1f688bSRobert Mustacchi
18bc1f688bSRobert MustacchiCSTD = $(CSTD_GNU99)
19bc1f688bSRobert MustacchiCFLAGS += $(CCVERBOSE)
20bc1f688bSRobert MustacchiLDLIBS += -lctf
215801b0f0SToomas SoomeNATIVE_LIBS += libctf.so libc.so
22bc1f688bSRobert Mustacchi
23bc1f688bSRobert MustacchiLDFLAGS = \
24bc1f688bSRobert Mustacchi	-L$(ROOTONBLDLIBMACH) \
25bc1f688bSRobert Mustacchi	'-R$$ORIGIN/../../lib/$(MACH)' \
265801b0f0SToomas Soome	$(BDIRECT)
27bc1f688bSRobert Mustacchi
28bc1f688bSRobert MustacchiCPPFLAGS += -include ../../common/ctf_headers.h
29bc1f688bSRobert Mustacchi
30bc1f688bSRobert MustacchiOBJS = $(SRCS:%.c=%.o)
31bc1f688bSRobert Mustacchi
32bc1f688bSRobert Mustacchiall: $(PROG)
33bc1f688bSRobert Mustacchi
34bc1f688bSRobert Mustacchi$(PROG): $(OBJS)
35bc1f688bSRobert Mustacchi	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
36bc1f688bSRobert Mustacchi	$(POST_PROCESS)
37bc1f688bSRobert Mustacchi
38bc1f688bSRobert Mustacchi%.o: $(SRC)/cmd/ctfdump/%.c
39bc1f688bSRobert Mustacchi	$(COMPILE.c) $<
40bc1f688bSRobert Mustacchi
41bc1f688bSRobert Mustacchi$(ROOTONBLDMACHPROG): $(PROG)
42bc1f688bSRobert Mustacchi
43bc1f688bSRobert Mustacchiinstall: $(ROOTONBLDMACHPROG)
44bc1f688bSRobert Mustacchi
45bc1f688bSRobert Mustacchiclean:
46*1e8d79d2SYuri Pankov	$(RM) $(OBJS)
47bc1f688bSRobert Mustacchi
48bc1f688bSRobert Mustacchiinclude $(SRC)/tools/Makefile.targ
49