-
Notifications
You must be signed in to change notification settings - Fork 197
/
Makefile
52 lines (38 loc) · 1.52 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ccflags-y+=-Wfatal-errors
ccflags-y+=-DDEBUG
ccflags-y+=-DUSE_PLATFORM_DEVICE
ccflags-y+=-fmax-errors=5
#ccflags-y+=-D USE_MISCDEV # uncomment to use single misc device instead char devices region
obj-m+= misc_loop_drv.o
obj-m+= ldt.o
obj-m+= ldt_plat_drv.o # implements platform_driver only
obj-m+= ldt_plat_dev.o # implements platform_device and resource
#obj-m+= chrdev_region_sample.o
obj-m+= kthread_sample.o
obj-m+= pci-ldt.o
export CPATH:=${PWD}/lib
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
all: modules dio
check:
./ldt-test
modules:
$(MAKE) -C $(KERNELDIR) M=$$PWD modules
modules_install:
$(MAKE) -C $(KERNELDIR) M=$$PWD modules_install
clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c *.mod \
.tmp_versions modules.order Module.symvers .cache.mk \
dio *.tmp *.log
dio: CPPFLAGS+= -DCTRACER_ON -include ctracer.h -g
#dio: CPPFLAGS+= -D VERBOSE
#_src = dio.c ldt.c ldt_plat_dev.c ldt_plat_drv.c ctracer.h ldt_configfs_basic.c ctracer.h tracing.h
_src = dio.c ldt.c ldt_plat_dev.c ldt_plat_drv.c ctracer.h ldt_configfs_basic.c misc_loop_drv.c
_src+= pci-ldt.c
checkpatch:
checkpatch.pl --no-tree --show-types --ignore LINE_CONTINUATIONS --terse -f $(_src) Makefile
checkpatch2:
checkpatch.pl --no-tree --show-types --ignore LONG_LINE,LINE_CONTINUATIONS --terse -f $(_src) Makefile
astyle:
astyle --style=linux --lineend=linux --indent=force-tab=8 \
--pad-comma --pad-header --pad-oper --keep-one-line-blocks --unpad-paren \
--attach-inlines --indent-labels --max-continuation-indent=80 $(_src)