diff options
author | Kyle K <kylek389@gmail.com> | 2012-12-22 00:31:53 -0600 |
---|---|---|
committer | Kyle Kaminski <kyle@kkaminsk.com> | 2012-12-22 00:31:53 -0600 |
commit | adbfb7c71fe1e958a2a2397c7b88c3061043c54e (patch) | |
tree | 28743080d118905dd5199f382a2f535d39c5b20b /Makefile | |
download | kernelhello-adbfb7c71fe1e958a2a2397c7b88c3061043c54e.tar.gz kernelhello-adbfb7c71fe1e958a2a2397c7b88c3061043c54e.tar.bz2 kernelhello-adbfb7c71fe1e958a2a2397c7b88c3061043c54e.zip |
initial commit
this is a simple try of unuseful code in kernel space, debugfs is
used to create a dir and a file
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 23 |
1 files changed, 23 insertions, 0 deletions
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 |