diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-05-03 21:08:42 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-05-03 21:08:42 +0400 |
commit | 1058def8e7827e56ce4a70afb4aeacb5dc44148f (patch) | |
tree | 4495d23e7b54ab5700e3839081e797c1eafe0db9 /setup/Linux/oss/build/Makefile.osscore | |
download | oss4-upstream/4.2-build2006.tar.gz |
Imported Upstream version 4.2-build2006upstream/4.2-build2006upstream
Diffstat (limited to 'setup/Linux/oss/build/Makefile.osscore')
-rw-r--r-- | setup/Linux/oss/build/Makefile.osscore | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/setup/Linux/oss/build/Makefile.osscore b/setup/Linux/oss/build/Makefile.osscore new file mode 100644 index 0000000..30d0287 --- /dev/null +++ b/setup/Linux/oss/build/Makefile.osscore @@ -0,0 +1,32 @@ +include /etc/oss.conf + +EXTRA_CFLAGS += -I${OSSLIBDIR}/include/internals -I${OSSLIBDIR}/include/sys + +ifneq ($(KERNELRELEASE),) + + obj-m := osscore.o + +else + + KERNELDIR ?= /lib/modules/$(shell uname -r)/build + PWD := $(shell pwd) +endif + +default: + @echo "static const char __oss_compile_vermagic[]" > ubuntu_version_hack.inc +#The kernel build system saves kernel version (obtained via "utsrelease.h") +#used during compile in a "vermagic" symbol. soundon compares this with +#current version of running kernel to know when to relink modules. +#Some Ubuntu kernels have 'uname -r' output different from "utsrelease.h" +#contents, so we save the previous uname as a fallback check. +# https://bugs.launchpad.net/ubuntu/+source/linux/+bug/247055 + @echo "__attribute__((used))" >> ubuntu_version_hack.inc + @echo "__attribute__((section(\".modinfo\")))" >> ubuntu_version_hack.inc + @echo "= \"$(shell /usr/sbin/ossvermagic -z -s)\";" >> ubuntu_version_hack.inc + + $(MAKE) -C $(KERNELDIR) M=$(PWD) modules + @rm -f ubuntu_version_hack.inc + +clean: + rm -f *.o *.ko *.mod.c *.mod.o .*.cmd core core.* x y z ubuntu_version_hack.inc + rm -rf .tmp_versions |