Linux kernel & device driver programming

Cross-Referenced Linux and Device Driver Code

[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ]
Version: [ 2.6.11.8 ] [ 2.6.25 ] [ 2.6.25.8 ] [ 2.6.31.13 ] Architecture: [ i386 ]
  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 -DSHORT_DEBUG # "-O" is needed to expand inlines
  8 else
  9   DEBFLAGS = -O2
 10 endif
 11 
 12 EXTRA_CFLAGS += $(DEBFLAGS)
 13 EXTRA_CFLAGS += -I..
 14 
 15 ifneq ($(KERNELRELEASE),)
 16 # call from kernel build system
 17 
 18 obj-m   := short.o
 19 
 20 else
 21 
 22 KERNELDIR ?= /lib/modules/$(shell uname -r)/build
 23 PWD       := $(shell pwd)
 24 
 25 default:
 26         $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
 27 
 28 endif
 29 
 30 
 31 clean:
 32         rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
 33 
 34 depend .depend dep:
 35         $(CC) $(CFLAGS) -M *.c > .depend
 36 
 37 
 38 ifeq (.depend,$(wildcard .depend))
 39 include .depend
 40 endif
  This page was automatically generated by the LXR engine.