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 EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINC)
13
14 ifneq ($(KERNELRELEASE),)
15 # call from kernel build system
16
17 scull-objs := main.o pipe.o access.o
18
19 obj-m := scull.o
20
21 else
22
23 KERNELDIR ?= /lib/modules/$(shell uname -r)/build
24 PWD := $(shell pwd)
25
26 modules:
27 echo $(MAKE) -C $(KERNELDIR) M=$(PWD) LDDINC=$(PWD)/../include 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 *.mod.o .*.cmd *.ko *.mod.c .tmp_versions *.markers *.symvers modules.order a.out sculltest
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.
|