1# $FreeBSD$ 2 3SYSCALLS= cap_fcntls_limit cap_getmode cap_ioctls_limit 4 5CFLAGS= -O2 -pipe -std=gnu99 -fstack-protector 6CFLAGS+= -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter 7CFLAGS+= -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type 8CFLAGS+= -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter 9CFLAGS+= -Wcast-align -Wchar-subscripts -Wnested-externs -Wredundant-decls 10CFLAGS+= -Wold-style-definition -Wno-pointer-sign 11 12all: ${SYSCALLS} ${SYSCALLS:=.t} 13 14.for SYSCALL in ${SYSCALLS} 15 16${SYSCALL}: ${SYSCALL}.c misc.c 17 ${CC} ${CFLAGS} ${@}.c misc.c -o $@ 18 19${SYSCALL}.t: ${SYSCALL} 20 @printf "#!/bin/sh\n\n%s/%s\n" ${.CURDIR} ${@:.t=} > $@ 21 22.endfor 23 24test: all 25 @prove -r ${.CURDIR} 26 27clean: 28 rm -f ${SYSCALLS} ${SYSCALLS:=.t} 29