3
EXTRA_CFLAGS += -I${OSSLIBDIR}/include/internals -I${OSSLIBDIR}/include/sys
5
ifneq ($(KERNELRELEASE),)
11
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
16
@echo "static const char __oss_compile_vermagic[]" > ubuntu_version_hack.inc
17
#The kernel build system saves kernel version (obtained via "utsrelease.h")
18
#used during compile in a "vermagic" symbol. soundon compares this with
19
#current version of running kernel to know when to relink modules.
20
#Some Ubuntu kernels have 'uname -r' output different from "utsrelease.h"
21
#contents, so we save the previous uname as a fallback check.
22
# https://bugs.launchpad.net/ubuntu/+source/linux/+bug/247055
23
@echo "__attribute__((used))" >> ubuntu_version_hack.inc
24
@echo "__attribute__((section(\".modinfo\")))" >> ubuntu_version_hack.inc
25
@echo "= \"$(shell /usr/sbin/ossvermagic -z -s)\";" >> ubuntu_version_hack.inc
27
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
28
@rm -f ubuntu_version_hack.inc
31
rm -f *.o *.ko *.mod.c *.mod.o .*.cmd core core.* x y z ubuntu_version_hack.inc