ifneq ($(KERNELRELEASE),) obj-m := ac97_codec.o sis5513.o else CHK := IPT := $(shell sed -e '/\#/d' ./config.in | grep linux_src_directory |\ awk -F\= '{print $$2}' | awk -F\ '{print $$1}') KDIR := /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) ifeq ($(IPT),$(CHK)) SRC := $(KDIR) else SRC := $(IPT) endif default: $(MAKE) -C $(SRC) SUBDIRS=$(PWD) modules .PHONY: clean clean: rm -f *.o *.ko *.mod.* .*.cmd *~ *.symvers rm -rf .tmp_versions endif