From 0d9aff9bd305d18625c322a1a891aba278049862 Mon Sep 17 00:00:00 2001 From: Kyle K Date: Mon, 24 Dec 2012 12:53:20 -0600 Subject: spawn char device at /dev/, implement read --- Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4104b64..4b897db 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,7 @@ -#ccflags-y += -g +# causes weird file size, smaller than stripped? +ifeq ($(DEBUG),) + ccflags-y += -g +endif # Makfile assignments: # := value at right is expanded and assigned at declaration time @@ -13,11 +16,13 @@ hello-y += main.o debug.o # .ko module to be created obj-m := hello.o +KERNELDIR ?= /lib/modules/$(shell uname -r)/build + # '-C' changes the dir # '-M' causes the the kernel's toplevel Makefile to move back into this dir # before trying to build 'modules' target all: - make -C /lib/modules/$(shell uname -r)/build KCPPFLAGS="-I$(CURDIR)" M=$(PWD) modules + make -C $(KERNELDIR) KCPPFLAGS="-I$(CURDIR)" M=$(PWD) modules clean: - make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean + make -C $(KERNELDIR) M=$(PWD) clean -- cgit v1.2.3