1 # 2 # Makefile for GCOV profiling kernel module 3 # 4 5 #KERNELDIR := ../linux-2.5.73 6 CFLAGS := $(CFLAGS) -Wall -g 7 8 ifneq ($(KERNELRELEASE),) 9 10 obj-m := LtpfsCmds.o 11 obj-p := ltpfstest 12 else 13 KDIR := /lib/modules/$(shell uname -r)/build 14 PWD := $(shell pwd) 15 16 default: 17 $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules 18 ${CC} $(CFLAGS) -o ltpfstest -lm main.c 19 # $(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) modules 20 endif 21 22 clean: 23 rm -f LtpfsCmds.o 24 rm -f LtpfsCmds.ko 25 rm -f LtpfsCmds.bb 26 rm -f LtpfsCmds.bbg 27 rm -f LtpfsCmds.mod.c 28 rm -f LtpfsCmds.mod.o 29 rm -f .*.mod* 30 rm -f .*.cmd 31