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
39addrs-32: addrs.c
40	$(LINK.c) addrs.c -o $@ $(LDLIBS)
41	$(POST_PROCESS)
42
43addrs-64: addrs.c
44	$(LINK64.c) addrs.c -o $@ $(LDLIBS)
45	$(POST_PROCESS)
46
47stacky := MAPFILE.NES=			# Will foil the test, clearly
48stacky: stacky.o
49	$(LINK.c) stacky.o -o $@ $(LDLIBS)
50	$(POST_PROCESS)
51
52secflags_syscall: secflags_syscall.c
53	$(LINK.c) secflags_syscall.c -o $@ $(LDLIBS)
54	$(POST_PROCESS)
55
56all: $(PROG)
57
58install: all $(CMDS)
59
60lint:
61
62clobber: clean
63	-$(RM) $(PROG)
64
65clean:
66
67$(CMDS): $(TESTDIR) $(PROG)
68
69$(TESTDIR):
70	$(INS.dir)
71
72$(TESTDIR)/%: %
73	$(INS.file)
74