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