1 # 2 # Makefile for GCOV profiling kernel module 3 # 4 5 EXTRA_CFLAGS := -Wall -W -Wno-unused-parameter 6 7 ifneq ($(KERNELRELEASE),) 8 9 obj-m := nlsTest.o 10 else 11 KDIR := /lib/modules/$(shell uname -r)/build 12 PWD := $(shell pwd) 13 14 default: 15 $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules 16 ${CC} $(EXTRA_CFLAGS) -o userBlockNLS userBlockNLS.c 17 # $(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) modules 18 19 clean: 20 $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) clean 21 rm -f modules.order 22 rm -f userBlockNLS 23 24 endif 25