xref: /illumos-gate/usr/src/test/util-tests/tests/demangle/Makefile (revision 4226f635096bf9d814aa9fb335518c4855bbe3a3)
1*4226f635SJason King#
2*4226f635SJason King# This file and its contents are supplied under the terms of the
3*4226f635SJason King# Common Development and Distribution License ("CDDL"), version 1.0.
4*4226f635SJason King# You may only use this file in accordance with the terms of version
5*4226f635SJason King# 1.0 of the CDDL.
6*4226f635SJason King#
7*4226f635SJason King# A full copy of the text of the CDDL should have accompanied this
8*4226f635SJason King# source.  A copy of the CDDL is also available via the Internet at
9*4226f635SJason King# http://www.illumos.org/license/CDDL.
10*4226f635SJason King#
11*4226f635SJason King
12*4226f635SJason King#
13*4226f635SJason King# Copyright 2018 Jason King.
14*4226f635SJason King#
15*4226f635SJason King
16*4226f635SJason Kinginclude $(SRC)/Makefile.master
17*4226f635SJason Kinginclude $(SRC)/cmd/Makefile.cmd
18*4226f635SJason Kinginclude $(SRC)/test/Makefile.com
19*4226f635SJason King
20*4226f635SJason KingROOTBINDIR = $(ROOTOPTPKG)/bin
21*4226f635SJason King
22*4226f635SJason KingPROG = gcc-libstdc++ llvm-stdcxxabi afl-fast
23*4226f635SJason King
24*4226f635SJason KingROOTOPTPKG = $(ROOT)/opt/util-tests
25*4226f635SJason KingTESTDIR = $(ROOTOPTPKG)/tests/demangle
26*4226f635SJason King
27*4226f635SJason KingCMDS = $(PROG:%=$(TESTDIR)/%)
28*4226f635SJason King$(CMDS) := FILEMODE = 0555
29*4226f635SJason King
30*4226f635SJason KingOBJS = $(PROG:%=%.o)
31*4226f635SJason KingSRCS = $(OBJS:%.o=%.c)
32*4226f635SJason King
33*4226f635SJason KingCSTD = $(CSTD_GNU99)
34*4226f635SJason King
35*4226f635SJason KingLDLIBS += -ldemangle-sys
36*4226f635SJason King
37*4226f635SJason Kingall: $(PROG)
38*4226f635SJason King
39*4226f635SJason Kinggcc-libstdc++: gcc-libstdc++.o
40*4226f635SJason King	$(LINK.c) -o $@ gcc-libstdc++.o $(LDLIBS)
41*4226f635SJason King	$(POST_PROCESS)
42*4226f635SJason King
43*4226f635SJason Kingllvm-stdcxxabi: llvm-stdcxxabi.o
44*4226f635SJason King	$(LINK.c) -o $@ llvm-stdcxxabi.o $(LDLIBS)
45*4226f635SJason King	$(POST_PROCESS)
46*4226f635SJason King
47*4226f635SJason Kingafl-fast: afl-fast.o
48*4226f635SJason King	$(LINK.c) -o $@ afl-fast.o $(LDLIBS)
49*4226f635SJason King	$(POST_PROCESS)
50*4226f635SJason King
51*4226f635SJason Kinginstall: all $(CMDS)
52*4226f635SJason King
53*4226f635SJason Kinglint:
54*4226f635SJason King
55*4226f635SJason Kingclobber: clean
56*4226f635SJason King	-$(RM) $(PROG)
57*4226f635SJason King
58*4226f635SJason Kingclean:
59*4226f635SJason King	-$(RM) $(OBJS)
60*4226f635SJason King
61*4226f635SJason King$(CMDS): $(TESTDIR) $(PROG)
62*4226f635SJason King
63*4226f635SJason King$(ROOTBINDIR):
64*4226f635SJason King	$(INS.dir)
65*4226f635SJason King
66*4226f635SJason King$(ROOTBINDIR)/%: %
67*4226f635SJason King	$(INS.file)
68*4226f635SJason King
69*4226f635SJason King$(TESTDIR):
70*4226f635SJason King	$(INS.dir)
71*4226f635SJason King
72*4226f635SJason King$(TESTDIR)/%: %
73*4226f635SJason King	$(INS.file)
74