TARGET := chardev WARN := -W -Wall -Wstrict-prototypes -Wmissing-prototypes INCLUDE := -isystem /lib/modules/`uname -r`/build/include CFLAGS := -O2 -DMODULE -D__KERNEL__ ${WARN} ${INCLUDE} CC := gcc # Note that we use CFLAGS for the kernel module but not the test program ${TARGET}.o: ${TARGET}.c ${CC} -c ${CFLAGS} ${TARGET}.c clean: rm -rf ${TARGET}.o