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