xref: /illumos-gate/usr/src/test/util-tests/tests/demangle/Makefile (revision 30165b7f6753bc3d48c52319bed7ec7b3ea36b3c)
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 Jason King.
14#
15
16include $(SRC)/Makefile.master
17include $(SRC)/cmd/Makefile.cmd
18include $(SRC)/test/Makefile.com
19
20ROOTBINDIR = $(ROOTOPTPKG)/bin
21
22PROG = gcc-libstdc++ llvm-stdcxxabi afl-fast
23
24ROOTOPTPKG = $(ROOT)/opt/util-tests
25TESTDIR = $(ROOTOPTPKG)/tests/demangle
26
27CMDS = $(PROG:%=$(TESTDIR)/%)
28$(CMDS) := FILEMODE = 0555
29
30OBJS = $(PROG:%=%.o)
31SRCS = $(OBJS:%.o=%.c)
32
33CSTD = $(CSTD_GNU99)
34
35LDLIBS += -ldemangle-sys
36
37all: $(PROG)
38
39gcc-libstdc++: gcc-libstdc++.o
40	$(LINK.c) -o $@ gcc-libstdc++.o $(LDLIBS)
41	$(POST_PROCESS)
42
43llvm-stdcxxabi: llvm-stdcxxabi.o
44	$(LINK.c) -o $@ llvm-stdcxxabi.o $(LDLIBS)
45	$(POST_PROCESS)
46
47afl-fast: afl-fast.o
48	$(LINK.c) -o $@ afl-fast.o $(LDLIBS)
49	$(POST_PROCESS)
50
51install: all $(CMDS)
52
53lint:
54
55clobber: clean
56	-$(RM) $(PROG)
57
58clean:
59	-$(RM) $(OBJS)
60
61$(CMDS): $(TESTDIR) $(PROG)
62
63$(ROOTBINDIR):
64	$(INS.dir)
65
66$(ROOTBINDIR)/%: %
67	$(INS.file)
68
69$(TESTDIR):
70	$(INS.dir)
71
72$(TESTDIR)/%: %
73	$(INS.file)
74