# ATTENTION: this makefile is adapted for ubuntu (preferred!) and # red hat enterprise linux (presumably compatible with fedora). # the default is ubuntu. # # as per popular request, please mail system detection patches to # oystein@powertech.no. I hope this issue will be gone by tomorrow # though. # # Be VERY sure to have KPATH point to valid kernel headers for the # _CURRENTLY RUNNING_ kernel, otherwise you might crash and burn. # # -- edison @ irc, efnet MAPFILE = /boot/System.map-$(shell uname -r) ADDRESS = `awk '$$3 == "sys_call_table" { print $$1 }' $(MAPFILE)` EXTRA_CFLAGS += -DSYS_CALL_TABLE_ADDR=0x$(ADDRESS) # ubuntu KPATH = /lib/modules/$(shell uname -r)/build # redhat # KPATH = /usr/src/kernels/$(shell uname -r)-$(shell uname -p) obj-m += ptpatch2008.o all: @echo kernel flags: $(EXTRA_CFLAGS) @echo kernel path: $(KPATH) make -C $(KPATH) M=$(PWD) modules clean: make -C $(KPATH) M=$(PWD) clean