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