1# 2# Makefile for GCOV profiling kernel module 3# 4 5#KERNELDIR := ../linux-2.5.73 6CFLAGS := $(CFLAGS) -Wall -g 7 8ifneq ($(KERNELRELEASE),) 9 10obj-m := LtpfsCmds.o 11obj-p := ltpfstest 12else 13KDIR := /lib/modules/$(shell uname -r)/build 14PWD := $(shell pwd) 15 16default: 17 $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules 18 ${CC} $(CFLAGS) -o ltpfstest -lm main.c 19# $(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) modules 20endif 21 22clean: 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