From ab121f379a3cff458c90e6f480ba4bb68c8733dd Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Sat, 27 Nov 2010 07:49:17 +0100 Subject: Linux Device Drivers 3 examples --- shortprint/Makefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 shortprint/Makefile (limited to 'shortprint/Makefile') diff --git a/shortprint/Makefile b/shortprint/Makefile new file mode 100644 index 0000000..42a9b53 --- /dev/null +++ b/shortprint/Makefile @@ -0,0 +1,31 @@ +# Comment/uncomment the following line to disable/enable debugging +#DEBUG = y + +CFLAGS += -O2 -I.. + +ifneq ($(KERNELRELEASE),) +# call from kernel build system + +obj-m := shortprint.o + +else + +KERNELDIR ?= /lib/modules/$(shell uname -r)/build +PWD := $(shell pwd) + +default: + $(MAKE) -C $(KERNELDIR) M=$(PWD) modules + +endif + + +clean: + rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions + +depend .depend dep: + $(CC) $(CFLAGS) -M *.c > .depend + + +ifeq (.depend,$(wildcard .depend)) +include .depend +endif -- cgit v1.2.1-18-gbd029