# get current release for include path RELEASE = $(shell uname -r) # set compile flags, defines and include directory CFLAGS = -Wall -O2 -fno-common INCLUDES = -I/lib/modules/$(RELEASE)/build/include DEFINES = -D__KERNEL__ -DMODULE -DKBUILD_MODNAME="tlbstat" all: tlbstat.o tlbstat.o: tlbstat.c gcc -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< clean: rm -f tlbstat.o *~ core