1 # Comment/uncomment the following line to disable/enable debugging
2 #DEBUG = y
3
4
5 # Add your debugging flag (or not) to CFLAGS
6 ifeq ($(DEBUG),y)
7 DEBFLAGS = -O -g -DSCULL_DEBUG # "-O" is needed to expand inlines
8 else
9 DEBFLAGS = -O2
10 endif
11
12 CFLAGS += $(DEBFLAGS)
13 CFLAGS += -I$(LDDINC)
14
15 ifneq ($(KERNELRELEASE),)
16 # call from kernel build system
17
18 scull-objs := main.o pipe.o access.o
19
20 obj-m := scull.o
21
22 else
23
24 KERNELDIR ?= /lib/modules/$(shell uname -r)/build
25 PWD := $(shell pwd)
26
27 modules:
28 $(MAKE) -C $(KERNELDIR) M=$(PWD) LDDINC=$(PWD)/../include modules
29
30 endif
31
32
33
34 clean:
35 rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
36
37 depend .depend dep:
38 $(CC) $(CFLAGS) -M *.c > .depend
39
40
41 ifeq (.depend,$(wildcard .depend))
42 include .depend
43 endif
|
This page was automatically generated by the
LXR engine.
|