2019-03-14 04:13:25 +01:00
|
|
|
#
|
|
|
|
# Peter Yang <turmary@126.com>
|
|
|
|
# Copyright (c) 2019 Seeed Studio
|
|
|
|
#
|
|
|
|
# MIT License
|
|
|
|
#
|
|
|
|
|
|
|
|
uname_r=$(shell uname -r)
|
|
|
|
|
|
|
|
# If KERNELRELEASE is defined, we've been invoked from the
|
|
|
|
# kernel build system and can use its language
|
|
|
|
ifneq ($(KERNELRELEASE),)
|
|
|
|
# $(warning KERNELVERSION=$(KERNELVERSION))
|
|
|
|
|
2017-09-14 10:29:26 +02:00
|
|
|
snd-soc-wm8960-objs := wm8960.o
|
2018-02-10 08:16:01 +01:00
|
|
|
snd-soc-ac108-objs := ac108.o ac101.o
|
2021-04-27 00:56:04 +02:00
|
|
|
snd-soc-seeed-voicecard-objs := seeed-voicecard.o
|
2017-09-14 10:29:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
obj-m += snd-soc-wm8960.o
|
|
|
|
obj-m += snd-soc-ac108.o
|
2018-04-04 11:36:18 +02:00
|
|
|
obj-m += snd-soc-seeed-voicecard.o
|
2017-09-14 10:29:26 +02:00
|
|
|
|
2018-03-26 10:24:12 +02:00
|
|
|
ifdef DEBUG
|
|
|
|
ifneq ($(DEBUG),0)
|
|
|
|
ccflags-y += -DDEBUG -DAC101_DEBG
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2017-04-27 09:31:04 +02:00
|
|
|
|
2019-03-14 04:13:25 +01:00
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
DEST := /lib/modules/$(uname_r)/kernel
|
|
|
|
|
2017-04-27 09:31:04 +02:00
|
|
|
all:
|
2019-03-14 04:13:25 +01:00
|
|
|
make -C /lib/modules/$(uname_r)/build M=$(PWD) modules
|
2017-04-27 09:31:04 +02:00
|
|
|
|
|
|
|
clean:
|
2019-03-14 04:13:25 +01:00
|
|
|
make -C /lib/modules/$(uname_r)/build M=$(PWD) clean
|
2017-04-27 09:31:04 +02:00
|
|
|
|
|
|
|
install:
|
2019-03-14 04:13:25 +01:00
|
|
|
sudo cp snd-soc-ac108.ko ${DEST}/sound/soc/codecs/
|
|
|
|
sudo cp snd-soc-wm8960.ko ${DEST}/sound/soc/codecs/
|
|
|
|
sudo cp snd-soc-seeed-voicecard.ko ${DEST}/sound/soc/bcm/
|
2017-04-27 09:31:04 +02:00
|
|
|
sudo depmod -a
|
2019-03-14 04:13:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
.PHONY: all clean install
|
|
|
|
|
|
|
|
endif
|
|
|
|
|