Makefile revision 182428
1# $FreeBSD: head/tools/regression/bpf/bpf_filter/Makefile 182428 2008-08-29 02:12:45Z 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 test0075 test0076 \ 22 test0077 test0078 test0079 test0080 \ 23 test0081 test0082 24 25SYSDIR?= ${.CURDIR}/../../../../sys 26 27SRCS= ${.CURDIR}/bpf_test.c 28 29CFLAGS+= -g -I${SYSDIR} -I${.CURDIR}/tests 30 31.if defined(BPF_BENCHMARK) 32CFLAGS+= -DBPF_BENCHMARK -DLOG_LEVEL=0 33.elif defined(LOG_LEVEL) 34CFLAGS+= -DLOG_LEVEL="${LOG_LEVEL}" 35.endif 36 37.if defined(BPF_VALIDATE) 38CFLAGS+= -DBPF_VALIDATE=${BPF_VALIDATE} 39.endif 40 41.if defined(BPF_JIT) && \ 42 (${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386") 43SRCS+= ${SYSDIR}/net/bpf_jitter.c \ 44 ${SYSDIR}/${MACHINE_ARCH}/${MACHINE_ARCH}/bpf_jit_machdep.c 45CFLAGS+= -DBPF_JIT_COMPILER 46WARNS?= 6 47.else 48SRCS+= ${SYSDIR}/net/bpf_filter.c 49WARNS?= 2 50.endif 51 52.for TEST in ${TEST_CASES} 53${TEST}: ${.CURDIR}/tests/${TEST}.h ${SRCS} 54 @${CC} ${CFLAGS} -DBPF_TEST_H=\"${TEST}.h\" \ 55 -o ${.CURDIR}/${TEST} ${SRCS} 56.endfor 57 58all: ${TEST_CASES} 59.for TEST in ${TEST_CASES} 60.if defined(BPF_BENCHMARK) || !defined(LOG_LEVEL) || (${LOG_LEVEL} > 0) 61 @${ECHO} -n "${TEST}: " 62.endif 63.if defined(BPF_BENCHMARK) 64 @-time ${.CURDIR}/${TEST} 65.else 66 @-env MALLOC_OPTIONS=J ${.CURDIR}/${TEST} 67.endif 68 @rm -f ${.CURDIR}/${TEST} 69.endfor 70 71clean: 72.for TEST in ${TEST_CASES} 73 @rm -f ${.CURDIR}/${TEST} 74.endfor 75 76.include <bsd.prog.mk> 77