diff options
author | Kyle K <kylek389@gmail.com> | 2012-12-24 12:53:20 -0600 |
---|---|---|
committer | Kyle Kaminski <kyle@kkaminsk.com> | 2012-12-24 12:53:20 -0600 |
commit | 0d9aff9bd305d18625c322a1a891aba278049862 (patch) | |
tree | 274aa52bf311107232488fb3f924cef316cfcb28 /Makefile | |
parent | f0531d88e958b5fa77f8dc9bb34e697e872aeba9 (diff) | |
download | kernelhello-0d9aff9bd305d18625c322a1a891aba278049862.tar.gz kernelhello-0d9aff9bd305d18625c322a1a891aba278049862.tar.bz2 kernelhello-0d9aff9bd305d18625c322a1a891aba278049862.zip |
spawn char device at /dev/, implement read
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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 |