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 15 include $(SRC)/cmd/Makefile.cmd 16 include $(SRC)/test/Makefile.com 17 18 PROG = 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 31 PROG += addrs-32 addrs-64 stacky 32 33 ROOTOPTPKG = $(ROOT)/opt/os-tests 34 TESTDIR = $(ROOTOPTPKG)/tests/secflags 35 36 CMDS = $(PROG:%=$(TESTDIR)/%) 37 $(CMDS) := FILEMODE = 0555 38 39 addrs-32: addrs.c 40 $(LINK.c) addrs.c -o $@ $(LDLIBS) 41 $(POST_PROCESS) 42 43 addrs-64: addrs.c 44 $(LINK64.c) addrs.c -o $@ $(LDLIBS) 45 $(POST_PROCESS) 46 47 stacky := MAPFILE.NES= # Will foil the test, clearly 48 stacky: stacky.o 49 $(LINK.c) stacky.o -o $@ $(LDLIBS) 50 $(POST_PROCESS) 51 52 secflags_syscall: secflags_syscall.c 53 $(LINK.c) secflags_syscall.c -o $@ $(LDLIBS) 54 $(POST_PROCESS) 55 56 all: $(PROG) 57 58 install: all $(CMDS) 59 60 lint: 61 62 clobber: clean 63 -$(RM) $(PROG) 64 65 clean: 66 67 $(CMDS): $(TESTDIR) $(PROG) 68 69 $(TESTDIR): 70 $(INS.dir) 71 72 $(TESTDIR)/%: % 73 $(INS.file)