xref: /minix/minix/tests/Makefile (revision e3b78ef1)
1NOGCCERROR:=	yes
2
3BINDIR?=	/usr/tests/minix-posix
4FILESDIR?=	/usr/tests/minix-posix
5WARNS?=		1
6
7# Tests have no manpages
8MKMAN=		no
9
10# They are all bin-owned; by default normal executable mode
11BINOWN=		bin
12
13# Needed by testsh1.sh
14FILES=		test1.c
15
16CFLAGS+=	-fno-builtin
17LDADD+=		-lm
18
19.include <bsd.own.mk>
20
21SUBDIR+=		blocktest
22SUBDIR+=		ddekit
23
24# Some have special flags compiling
25CPPFLAGS.test56.c += -D_MINIX_SYSTEM=1
26
27COPTS.test9.c=	-O0
28COPTS.test37.c=	-O0
29COPTS.test53.c=	-O0
30COPTS.test68.c=	-O0
31
32# Some have special libraries
33LDADD.test59=	-lmthread
34LDADD.test76=	-lutil
35LDADD.test77=	-lutil
36
37# Some have an extra file
38OBJS.test57=	test57loop.o
39
40# Cache testing programs
41OBJS.test71+=	testcache.o
42OBJS.test72+=	testcache.o
43OBJS.test74+=	testcache.o
44LDADD.test72+=	-lminixfs
45
46PROGS += testvm
47OBJS.testvm+=	testcache.o
48LDSTATIC.testvm= -static
49LDADD.testvm+=	-lsys -ltimers
50
51FILES += testvm.conf
52
53# Tests to compile, For every architecture
54MINIX_TESTS= \
55 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 \
5621 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 \
5741 42 43 44 45 46    48 49 50    52 53 54 55 56    58 59 60 \
5861       64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
59
60.if ${MACHINE_ARCH} == "i386"
61MINIX_TESTS+= \
62                  47          51                57 \
63   62
64.endif #  ${MACHINE_ARCH} == "i386"
65
66.for t in ${MINIX_TESTS}
67PROGS+= test${t}
68.endfor
69
70PROGS+=	t10a t11a t11b t40a t40b t40c t40d t40e t40f t40g t60a t60b \
71	t67a t67b t68a t68b tvnd
72
73SCRIPTS+= run check-install testinterp.sh testsh1.sh testsh2.sh testmfs.sh \
74	  testisofs.sh testvnd.sh testkyua.sh testrelpol.sh
75
76# test57loop.S is not linked into the .bcl file.
77# This way, we can link it in when linking the final binary
78LDADD.test57+= ${${USE_BITCODE:Uno} != "no":? test57loop.o -Wl,-allow-multiple-definition:}
79
80.if ${MKPIC} == "yes"
81# Build them as dynamic executables by default if shared libraries
82# are available; so that the building and executing of dynamic
83# executables is tested
84LDSTATIC=	-dynamic
85
86LDFLAGS.mod+=	-shared		# make shared object
87
88# Files which have to be compiled with -fPIC
89mod.o: mod.c
90	${COMPILE.c} -fPIC ${.IMPSRC}
91
92common.o: common.c
93	${COMPILE.c} -fPIC ${.IMPSRC}
94
95# Add test that must be linked dynamically, and its dynamically loaded
96# module
97PROGS+=		test63 mod
98.endif # ${MKPIC} == "yes"
99
100.for o in $(PROGS)
101OBJS.${o} += common.o
102.endfor
103
104# LSC Make sure there is not leftover after a failed testrun
105clean: .PHONY .MAKE
106	@rm -rf DIR*
107
108.include <bsd.prog.mk>
109.include <bsd.subdir.mk>
110