forked from makelinux/ldt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (23 loc) · 1.03 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
#ccflags-y+=-Wfatal-errors
ccflags-y+=-D DEBUG
ccflags-y+=-D USE_PLATFORM_DEVICE
ccflags-y+=-fmax-errors=5
#ccflags-y+=-D USE_MISCDEV # uncomment to use single misc device instead char devices region
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+= ldt_configfs_basic.o
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
all: modules dio
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 .tmp_versions modules.order Module.symvers dio *.tmp *.log
dio: CPPFLAGS+= -D CTRACER_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
checkpatch:
/usr/src/linux-headers-$(shell uname -r)/scripts/checkpatch.pl --no-tree --show-types --ignore LONG_LINE,LINE_CONTINUATIONS --terse -f $(_src) Makefile