2013-03-08 17:02:27 +01:00
|
|
|
BINDIR?= /usr/tests/minix-posix
|
2013-08-24 14:15:05 +02:00
|
|
|
FILESDIR?= /usr/tests/minix-posix
|
2013-03-08 17:02:27 +01:00
|
|
|
WARNS?= 1
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2012-04-08 19:22:02 +02:00
|
|
|
# Tests have no manpages
|
2013-03-08 17:02:27 +01:00
|
|
|
MKMAN= no
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2012-04-08 19:22:02 +02:00
|
|
|
# They are all bin-owned; by default normal executable mode
|
2013-03-08 17:02:27 +01:00
|
|
|
BINOWN= bin
|
|
|
|
|
2013-08-24 14:15:05 +02:00
|
|
|
# Needed by testsh1.sh
|
|
|
|
FILES= test1.c
|
|
|
|
|
2013-03-08 17:02:27 +01:00
|
|
|
CFLAGS+= -fno-builtin
|
|
|
|
LDADD+= -lm -lcompat_minix
|
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2012-04-08 19:22:02 +02:00
|
|
|
# Some have special flags compiling
|
2013-03-08 17:02:27 +01:00
|
|
|
.if ${MACHINE_ARCH} == "i386"
|
|
|
|
# LSC FIXME: Compilation error for now on ARM with that!
|
|
|
|
COPTS.test51.c= -mhard-float
|
|
|
|
COPTS.test52.c= -mhard-float
|
|
|
|
.endif
|
|
|
|
|
2013-08-14 14:29:26 +02:00
|
|
|
WARNS=
|
2013-03-08 17:02:27 +01:00
|
|
|
COPTS.test9.c= -O0
|
|
|
|
COPTS.test37.c= -O0
|
|
|
|
COPTS.test53.c= -O0
|
|
|
|
COPTS.test68.c= -O0
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2012-04-08 19:22:02 +02:00
|
|
|
# Some have special libraries
|
2013-03-08 17:02:27 +01:00
|
|
|
LDADD.test59= -lmthread
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2012-04-08 19:22:02 +02:00
|
|
|
# Some have an extra file
|
2013-03-08 17:02:27 +01:00
|
|
|
OBJS.test57= test57loop.o
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2013-04-12 22:54:42 +02:00
|
|
|
# Cache testing programs
|
|
|
|
OBJS.test71+= testcache.o
|
|
|
|
OBJS.test72+= testcache.o
|
2013-05-07 14:36:09 +02:00
|
|
|
OBJS.test74+= testcache.o
|
2013-04-12 22:54:42 +02:00
|
|
|
LDADD.test72+= -lminixfs
|
2012-11-08 13:45:06 +01:00
|
|
|
|
2013-03-20 20:18:52 +01:00
|
|
|
PROGS += testvm
|
|
|
|
OBJS.testvm+= testcache.o
|
2013-04-24 18:57:59 +02:00
|
|
|
LDSTATIC.testvm= -static
|
2013-06-17 16:51:49 +02:00
|
|
|
LDADD.testvm+= -lsys -ltimers -lminlib
|
2013-04-12 22:54:42 +02:00
|
|
|
|
|
|
|
FILES += testvm.conf
|
|
|
|
|
2013-03-08 17:02:27 +01:00
|
|
|
# Tests to compile, For every architecture
|
|
|
|
MINIX_TESTS= \
|
2012-04-08 19:22:02 +02:00
|
|
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 \
|
|
|
|
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 \
|
2013-03-08 17:02:27 +01:00
|
|
|
41 42 43 44 45 46 48 49 50 52 53 54 55 56 58 59 60 \
|
2013-06-25 14:41:01 +02:00
|
|
|
61 64 65 66 67 68 69 70 71 72 73 74 75
|
2013-03-08 17:02:27 +01:00
|
|
|
|
|
|
|
.if ${MACHINE_ARCH} == "i386"
|
|
|
|
MINIX_TESTS+= \
|
|
|
|
47 51 57 \
|
|
|
|
62
|
|
|
|
.endif # ${MACHINE_ARCH} == "i386"
|
|
|
|
|
|
|
|
.if ${MACHINE_ARCH} == "earm"
|
|
|
|
# LSC Not yet supported on ARM
|
|
|
|
MKPIC:= no
|
|
|
|
LDSTATIC:= -static
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.for t in ${MINIX_TESTS}
|
|
|
|
PROGS+= test${t}
|
2012-04-08 19:22:02 +02:00
|
|
|
.endfor
|
|
|
|
|
2013-03-08 17:02:27 +01:00
|
|
|
PROGS+= t10a t11a t11b t40a t40b t40c t40d t40e t40f t60a t60b \
|
2013-02-27 16:40:54 +01:00
|
|
|
t67a t67b t68a t68b
|
2012-04-08 19:22:02 +02:00
|
|
|
|
2013-11-19 17:01:23 +01:00
|
|
|
SCRIPTS+= run testinterp.sh testsh1.sh testsh2.sh testmfs.sh testisofs.sh
|
2012-04-08 19:22:02 +02:00
|
|
|
|
2013-03-08 17:02:27 +01:00
|
|
|
.if ${MKPIC} == "yes"
|
2012-04-08 19:22:02 +02:00
|
|
|
# Build them as dynamic executables by default if shared libraries
|
|
|
|
# are available; so that the building and executing of dynamic
|
|
|
|
# executables is tested
|
2012-11-16 20:20:52 +01:00
|
|
|
LDSTATIC= -dynamic
|
2012-04-08 19:22:02 +02:00
|
|
|
|
2013-06-11 21:08:05 +02:00
|
|
|
# use the shared linkerscript for mod when using the gold linker
|
|
|
|
GOLDLINKERSCRIPT.mod?= ${${HAVE_GOLD:Uno} != "no":? ${LDS_SHARED_LIB} :}
|
2013-04-24 18:57:59 +02:00
|
|
|
LDFLAGS.mod+= -shared # make shared object
|
|
|
|
|
|
|
|
# LSC FIXME: THe bitcode rules need to take into account LDFLAGS
|
2013-06-17 16:51:49 +02:00
|
|
|
LDADD.mod+= ${${USE_BITCODE:Uno} != "no":? -shared:}
|
2013-04-24 18:57:59 +02:00
|
|
|
|
|
|
|
# Files which have to be compiled with -fPIC
|
|
|
|
mod.o: mod.c
|
|
|
|
${COMPILE.c} -fPIC ${.IMPSRC}
|
|
|
|
|
|
|
|
common.o: common.c
|
|
|
|
${COMPILE.c} -fPIC ${.IMPSRC}
|
|
|
|
|
2013-06-17 16:51:49 +02:00
|
|
|
# test57loop.S is not linked into the .bcl file.
|
|
|
|
# This way, we can link it in when linking the final binary
|
|
|
|
LDADD.test57+= ${${USE_BITCODE:Uno} != "no":? test57loop.o -Wl,-allow-multiple-definition:}
|
2013-06-11 21:08:05 +02:00
|
|
|
|
2012-04-08 19:22:02 +02:00
|
|
|
# Add test that must be linked dynamically, and its dynamically loaded
|
|
|
|
# module
|
2013-03-08 17:02:27 +01:00
|
|
|
PROGS+= test63 mod
|
2013-04-24 18:57:59 +02:00
|
|
|
.endif # ${MKPIC} == "yes"
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2013-04-16 18:04:46 +02:00
|
|
|
.for o in $(PROGS)
|
|
|
|
OBJS.${o} += common.o
|
|
|
|
.endfor
|
|
|
|
|
2013-03-08 17:02:27 +01:00
|
|
|
# LSC Make sure there is not leftover after a failed testrun
|
2012-04-08 19:22:02 +02:00
|
|
|
clean: .PHONY .MAKE
|
2013-04-17 13:01:55 +02:00
|
|
|
@${MAKE} -C select clean || true
|
|
|
|
@rm -rf DIR*
|
2013-03-08 17:02:27 +01:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|