summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 2240f9b20455204a6ff11223dbaa287fd6928bcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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