xref: /illumos-gate/usr/src/test/os-tests/tests/secflags/Makefile (revision d1aea6f139360e9e7f1504facb24f8521047b15c)
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# Copyright 2015, Richard Lowe.
13
14
15include $(SRC)/cmd/Makefile.cmd
16include $(SRC)/test/Makefile.com
17
18PROG =	secflags_aslr		\
19	secflags_core		\
20	secflags_dts		\
21	secflags_elfdump	\
22	secflags_forbidnullmap	\
23	secflags_limits		\
24	secflags_noexecstack	\
25	secflags_proc		\
26	secflags_psecflags	\
27	secflags_syscall	\
28	secflags_truss		\
29	secflags_zonecfg
30
31PROG += addrs-32 addrs-64 stacky
32
33ROOTOPTPKG = $(ROOT)/opt/os-tests
34TESTDIR = $(ROOTOPTPKG)/tests/secflags
35
36CMDS = $(PROG:%=$(TESTDIR)/%)
37$(CMDS) := FILEMODE = 0555
38
39CLEANFILES= stacky.o
40
41addrs-32: addrs.c
42	$(LINK.c) addrs.c -o $@ $(LDLIBS)
43	$(POST_PROCESS)
44
45addrs-64: addrs.c
46	$(LINK64.c) addrs.c -o $@ $(LDLIBS)
47	$(POST_PROCESS)
48
49stacky := MAPFILE.NES=			# Will foil the test, clearly
50stacky: stacky.o
51	$(LINK.c) stacky.o -o $@ $(LDLIBS)
52	$(POST_PROCESS)
53
54secflags_syscall: secflags_syscall.c
55	$(LINK.c) secflags_syscall.c -o $@ $(LDLIBS)
56	$(POST_PROCESS)
57
58all: $(PROG)
59
60install: all $(CMDS)
61
62lint:
63
64clobber: clean
65	-$(RM) $(PROG)
66
67clean:
68	-$(RM) $(CLEANFILES)
69
70$(CMDS): $(TESTDIR) $(PROG)
71
72$(TESTDIR):
73	$(INS.dir)
74
75$(TESTDIR)/%: %
76	$(INS.file)
77