From adbfb7c71fe1e958a2a2397c7b88c3061043c54e Mon Sep 17 00:00:00 2001 From: Kyle K Date: Sat, 22 Dec 2012 00:31:53 -0600 Subject: initial commit this is a simple try of unuseful code in kernel space, debugfs is used to create a dir and a file --- Makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4104b64 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +#ccflags-y += -g + +# Makfile assignments: +# := value at right is expanded and assigned at declaration time +# = value at right is expanded only when it is used, hence it is a reference +# ?= value at right is assigned only if the variable doesn't have a value +# +# + +# objects that are part of hello module (hello.o) +hello-y += main.o debug.o + +# .ko module to be created +obj-m := hello.o + +# '-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 + +clean: + make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean -- cgit v1.2.3