diff options
author | spiff <spiff@xbmc.org> | 2013-08-07 18:06:32 +0200 |
---|---|---|
committer | spiff <spiff@xbmc.org> | 2013-08-07 18:06:32 +0200 |
commit | 398c33e28de26c41d87937f82d72bf6d42c062d0 (patch) | |
tree | 3173b8314e38c51c7b6556908d9924bd57c27b1e /m4 | |
parent | 8e1eeb58f7971ab0c7fb6ef0a6c69aa5bb78deb7 (diff) |
added: generate and install cmake helpers for addons
Diffstat (limited to 'm4')
-rw-r--r-- | m4/xbmc_arch.m4 | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/m4/xbmc_arch.m4 b/m4/xbmc_arch.m4 new file mode 100644 index 0000000000..147f0b1d82 --- /dev/null +++ b/m4/xbmc_arch.m4 @@ -0,0 +1,51 @@ +AC_DEFUN([XBMC_SETUP_ARCH_DEFINES],[ + +# host detection and setup +case $host in + i*86*-linux-gnu*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") + ;; + x86_64-*-linux-gnu*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") + ;; + i386-*-freebsd*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_FREEBSD -D_LINUX") + ;; + amd64-*-freebsd*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_FREEBSD -D_LINUX") + ;; + arm-apple-darwin*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_IOS -D_LINUX") + ;; + *86*-apple-darwin*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX") + ;; + powerpc-apple-darwin*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX") + ;; + powerpc-*-linux-gnu*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC") + ;; + powerpc64-*-linux-gnu*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC64") + ;; + arm*-*-linux-gnu*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") + ;; + arm*-*linux-android*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -DTARGET_ANDROID") + ;; + *) + AC_MSG_ERROR(unsupported host ($host)) +esac + +if test "$target_platform" = "target_android" ; then + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -DTARGET_ANDROID") +fi + +case $use_platform in + raspberry-pi) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_ARMEL -DTARGET_RASPBERRY_PI") + ;; +esac +]) |