This repository was archived by the owner on Mar 7, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ .built-in.o.cmd
2
+ .dummy.ko.cmd
3
+ .dummy.mod.o.cmd
4
+ .dummy.o.cmd
5
+ .tmp_versions /
6
+ Module.symvers
7
+ built-in.o
8
+ dummy.c
9
+ dummy.ko
10
+ dummy.mod.c
11
+ dummy.mod.o
12
+ dummy.o
13
+ modules.order
Original file line number Diff line number Diff line change
1
+ ifneq ($(KERNELRELEASE ) ,)
2
+ obj-m += dummy.o
3
+ clean-files := dummy.c
4
+
5
+ $(M ) /dummy.c :
6
+ @echo $(NOSTDINC_FLAGS ) $(LINUXINCLUDE ) $(__c_flags ) $(modkern_cflags )
7
+ @touch $@
8
+ else
9
+ KDIR ?= /lib/modules/$(shell uname -r) /build
10
+ CLANG ?= clang
11
+ all :
12
+ $(MAKE ) -C $(KDIR ) M=$(CURDIR ) CC=$(CLANG )
13
+ clean :
14
+ $(MAKE ) -C $(KDIR ) M=$(CURDIR ) clean
15
+ endif
Original file line number Diff line number Diff line change
1
+ Prints the compiler arguments needed to run Clang against the kernel
2
+ headers. We use this for running libclang from bindgen.
3
+
4
+ Normal usage: run ` make -s ` and look at stdout (errors go to stderr). If
5
+ you need to build for a specific set of kernel headers, add
6
+ something like ` KDIR=/lib/modules/3.16.0-4-amd64/build ` . If your clang
7
+ command is not ` clang ` , add something like ` CLANG=clang-3.8 ` .
8
+
9
+ This generates a non-functional kernel module in the process. To clean
10
+ up, ` make clean ` .
You can’t perform that action at this time.
0 commit comments