CFLAGS += -I$(LDDINC) -g all : modules note1ctl ifneq ($(KERNELRELEASE),) snd_noteone-objs := main.o note1_get_set.o obj-m := snd_noteone.o else KERNELDIR ?= /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) modules: $(MAKE) -C $(KERNELDIR) M=$(PWD) LDDINC=$(PWD)/../include/modules endif note1ctl : note1ctl.c gcc -o note1ctl note1ctl.c clean: rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions note1ctl depend .depend dep: $(CC) $(CFLAGS) -M *.c > .depend ifeq (.depend,$(wildcard .depend)) include .depend endif install: cp snd_noteone.ko /lib/modules/2.6.16.14/kernel/sound/drivers/ modules-update