1
2 # Comment/uncomment the following line to enable/disable debugging
3 #DEBUG = y
4
5
6 ifeq ($(DEBUG),y)
7 DEBFLAGS = -O -g -DSCULLV_DEBUG # "-O" is needed to expand inlines
8 else
9 DEBFLAGS = -O2
10 endif
11
12 EXTRA_CFLAGS += $(DEBFLAGS) -I$(LDDINC)
13
14 TARGET = scullv
15
16 ifneq ($(KERNELRELEASE),)
17
18 scullv-objs := main.o mmap.o
19
20 obj-m := scullv.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) modules
29
30 endif
31
32
33 install:
34 install -d $(INSTALLDIR)
35 install -c $(TARGET).o $(INSTALLDIR)
36
37 clean:
38 rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
39
40
41 depend .depend dep:
42 $(CC) $(CFLAGS) -M *.c > .depend
43
44 ifeq (.depend,$(wildcard .depend))
45 include .depend
46 endif
|
This page was automatically generated by the
LXR engine.
|