diff options
author | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2018-10-29 17:43:12 +1100 |
---|---|---|
committer | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2018-10-29 17:45:19 +1100 |
commit | f55fa7657dd217a71af9198e0bc5754c0cd335ce (patch) | |
tree | a89858857e3e0ec7672866d086e12b3c58cf84e3 /Makefile | |
parent | 96aa81e1426e64875850616e12c3415231ed14f8 (diff) | |
parent | 188712f58b309d94d26d7468a792326c464a7eda (diff) |
Merge remote-tracking branch 'agl/master' into flounder
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e2a154e --- /dev/null +++ b/Makefile @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: GPL-2.0 +obj-$(CONFIG_AVIRT) += snd-avirt-core.o +snd-avirt-core-y := core.o +snd-avirt-core-y += pcm.o +snd-avirt-core-y += configfs.o + +ifeq ($(CONFIG_AVIRT_BUILDLOCAL),) + CCFLAGS_AVIRT := "drivers/staging/" +else + CCFLAGS_AVIRT := "$(PWD)" +endif + +ccflags-y += -I${CCFLAGS_AVIRT} + +$(info $(KERNELRELEASE)) +obj-$(CONFIG_AVIRT_AP_DUMMY) += dummy/ +obj-$(CONFIG_AVIRT_AP_LOOPBACK) += loopback/ + +### +# For out-of-tree building +### +ifdef PKG_CONFIG_SYSROOT_DIR + # AGL SDK kernel src path + KERNEL_SRC=$(PKG_CONFIG_SYSROOT_DIR)/usr/src/kernel +else + # General Linux distro kernel src path + KERNEL_SRC=/lib/modules/$(shell uname -r)/build +endif + +all: + CONFIG_AVIRT=m CONFIG_AVIRT_BUILDLOCAL=y \ + CONFIG_AVIRT_AP_DUMMY=m \ + CONFIG_AVIRT_AP_LOOPBACK=m \ + make -C $(KERNEL_SRC) M=$(PWD) + +clean: + make -C $(KERNEL_SRC) M=$(PWD) clean + |