Makefile revision 182183
1# $FreeBSD: head/tools/regression/bpf/bpf_filter/Makefile 182183 2008-08-25 23:36:24Z jkim $ 2 3TEST_CASES= test0001 test0002 test0003 test0004 \ 4 test0005 test0006 test0007 test0008 \ 5 test0009 test0010 test0011 test0012 \ 6 test0013 test0014 test0015 test0016 \ 7 test0017 test0018 test0019 test0020 \ 8 test0021 test0022 test0023 test0024 \ 9 test0025 test0026 test0027 test0028 \ 10 test0029 test0030 test0031 test0032 \ 11 test0033 test0034 test0035 test0036 \ 12 test0037 test0038 test0039 test0040 \ 13 test0041 test0042 test0043 test0044 \ 14 test0045 test0046 test0047 test0048 \ 15 test0049 test0050 test0051 test0052 \ 16 test0053 test0054 test0055 test0056 \ 17 test0057 test0058 test0059 test0060 \ 18 test0061 test0062 test0063 test0064 \ 19 test0065 test0066 test0067 test0068 \ 20 test0069 test0070 test0071 test0072 \ 21 test0073 test0074 22 23SYSDIR?= ${.CURDIR}/../../../../sys 24 25SRCS= ${.CURDIR}/bpf_test.c 26 27CFLAGS+= -g -fno-builtin-abort -I${.CURDIR}/tests 28 29.if defined(BPF_BENCHMARK) 30CFLAGS+= -DBPF_BENCHMARK -DLOG_LEVEL=0 31.elif defined(LOG_LEVEL) 32CFLAGS+= -DLOG_LEVEL="${LOG_LEVEL}" 33.endif 34 35.if defined(BPF_VALIDATE) 36CFLAGS+= -DBPF_VALIDATE 37.endif 38 39.if (${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386") && defined(BPF_JIT) 40SRCS+= ${SYSDIR}/net/bpf_jitter.c \ 41 ${SYSDIR}/${MACHINE_ARCH}/${MACHINE_ARCH}/bpf_jit_machdep.c 42CFLAGS+= -I${SYSDIR} -DBPF_JIT_COMPILER 43WARNS?= 6 44.else 45SRCS+= ${SYSDIR}/net/bpf_filter.c 46WARNS?= 1 47.endif 48 49.for TEST in ${TEST_CASES} 50${TEST}: ${.CURDIR}/tests/${TEST}.h ${SRCS} 51 @${CC} ${CFLAGS} -DBPF_TEST_H=\"${TEST}.h\" -o ${.CURDIR}/${TEST} ${SRCS} 52.endfor 53 54all: ${TEST_CASES} 55.for TEST in ${TEST_CASES} 56.if defined(BPF_BENCHMARK) || !defined(LOG_LEVEL) || (${LOG_LEVEL} > 0) 57 @${ECHO} -n "${TEST}: " 58.endif 59.if defined(BPF_BENCHMARK) 60 @-time ${.CURDIR}/${TEST} 61.else 62 @-${.CURDIR}/${TEST} 63.endif 64 @rm -f ${.CURDIR}/${TEST} 65.endfor 66 67clean: 68.for TEST in ${TEST_CASES} 69 @rm -f ${.CURDIR}/${TEST} 70.endfor 71 72.include <bsd.prog.mk> 73