diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/EventClients/Clients/OSXRemote/Makefile.in | 18 | ||||
-rw-r--r-- | tools/EventClients/Makefile.in | 28 | ||||
-rwxr-xr-x | tools/buildsteps/rbpi/prepare-xbmc | 1 | ||||
-rw-r--r-- | tools/depends/configure.ac | 4 | ||||
-rw-r--r-- | tools/depends/m4/ax_cxx_compile_stdcxx_11.m4 | 146 | ||||
-rw-r--r-- | tools/depends/m4/xbmc_arch.m4 | 83 |
6 files changed, 231 insertions, 49 deletions
diff --git a/tools/EventClients/Clients/OSXRemote/Makefile.in b/tools/EventClients/Clients/OSXRemote/Makefile.in deleted file mode 100644 index 1d08fb596d..0000000000 --- a/tools/EventClients/Clients/OSXRemote/Makefile.in +++ /dev/null @@ -1,18 +0,0 @@ -#convenience makefile to allow headless osx build - -DEBUG_FLAGS=@DEBUG_FLAGS@ - -#check for debug build -ifneq (,$(findstring _DEBUG, $(DEBUG_FLAGS))) - CONFIGURATION=Debug -else - CONFIGURATION=Release -endif - -all: - xcodebuild -configuration $(CONFIGURATION) - -clean: - xcodebuild clean -configuration $(CONFIGURATION) - -.PHONY: all clean diff --git a/tools/EventClients/Makefile.in b/tools/EventClients/Makefile.in deleted file mode 100644 index 2cd5712bfa..0000000000 --- a/tools/EventClients/Makefile.in +++ /dev/null @@ -1,28 +0,0 @@ -WII_EXTRA_OPTS= -CLEAN_FILES=Clients/WiiRemote/WiiRemote -PYTHON_SITEDIR := $(shell python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()") - -all: install - -wiimote: Clients/WiiRemote/WiiRemote - -Clients/WiiRemote/WiiRemote: - cd Clients/WiiRemote && \ - $(CXX) $(CXXFLAGS) $(LDFLAGS) CWIID_WiiRemote.cpp -lcwiid -lbluetooth -DICON_PATH="\"$(datarootdir)/pixmaps/@APP_NAME_LC@/\"" $(WII_EXTRA_OPTS) -o WiiRemote - -install: Clients/WiiRemote/WiiRemote - mkdir -p $(DESTDIR)$(bindir) - cp -a Clients/WiiRemote/WiiRemote $(DESTDIR)$(bindir)/@APP_NAME_LC@-wiiremote - cp -a Clients/PS3\ BD\ Remote/ps3_remote.py $(DESTDIR)$(bindir)/@APP_NAME_LC@-ps3remote - cp -a Clients/PS3\ Sixaxis\ Controller/ps3d.py $(DESTDIR)$(bindir)/@APP_NAME_LC@-ps3d - cp -a Clients/Kodi\ Send/kodi-send.py $(DESTDIR)$(bindir)/@APP_NAME_LC@-send - mkdir -p $(DESTDIR)$(PYTHON_SITEDIR)/@APP_NAME_LC@ - echo 'ICON_PATH="$(datarootdir)/pixmaps/@APP_NAME_LC@/"' > $(DESTDIR)$(PYTHON_SITEDIR)/@APP_NAME_LC@/defs.py - cp -a lib/python/* $(DESTDIR)$(PYTHON_SITEDIR)/@APP_NAME_LC@/ - cp -a Clients/PS3\ BD\ Remote/ps3_remote.py $(DESTDIR)$(PYTHON_SITEDIR)/@APP_NAME_LC@/ - mkdir -p $(DESTDIR)$(includedir)/@APP_NAME_LC@ - cp -a lib/c++/* $(DESTDIR)$(includedir)/@APP_NAME_LC@/ - mkdir -p $(DESTDIR)$(datarootdir)/pixmaps/@APP_NAME_LC@ - cp -a icons/* $(DESTDIR)$(datarootdir)/pixmaps/@APP_NAME_LC@/ - -include ../../Makefile.include diff --git a/tools/buildsteps/rbpi/prepare-xbmc b/tools/buildsteps/rbpi/prepare-xbmc index 15bd09542d..65e79155dc 100755 --- a/tools/buildsteps/rbpi/prepare-xbmc +++ b/tools/buildsteps/rbpi/prepare-xbmc @@ -3,7 +3,6 @@ XBMC_PLATFORM_DIR=rbpi . $WORKSPACE/tools/buildsteps/defaultenv cd $WORKSPACE -JSON_BUILDER=$XBMC_DEPENDS_ROOT/i686-linux-gnu-native/bin/JsonSchemaBuilder ./bootstrap #build binary addons before building xbmc... #make sure that binary_addons don't clean the native tools diff --git a/tools/depends/configure.ac b/tools/depends/configure.ac index 3626ea5204..6c3fb229f3 100644 --- a/tools/depends/configure.ac +++ b/tools/depends/configure.ac @@ -12,8 +12,8 @@ passed_cflags="$CFLAGS" passed_ldflags="$LDFLAGS" passed_cxxflags="$CXXFLAGS" -m4_include([../../m4/xbmc_arch.m4]) -m4_include([../../m4/ax_cxx_compile_stdcxx_11.m4]) +m4_include([m4/xbmc_arch.m4]) +m4_include([m4/ax_cxx_compile_stdcxx_11.m4]) AX_CXX_COMPILE_STDCXX_11(,[mandatory]) c11_flags="$CFLAGS" cxx11_flags="$CXXFLAGS" diff --git a/tools/depends/m4/ax_cxx_compile_stdcxx_11.m4 b/tools/depends/m4/ax_cxx_compile_stdcxx_11.m4 new file mode 100644 index 0000000000..cee493a1ef --- /dev/null +++ b/tools/depends/m4/ax_cxx_compile_stdcxx_11.m4 @@ -0,0 +1,146 @@ +# ============================================================================ +# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html +# ============================================================================ +# +# SYNOPSIS +# +# AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional]) +# +# DESCRIPTION +# +# Check for baseline language coverage in the compiler for the C++11 +# standard; if necessary, add switches to CXXFLAGS to enable support. +# +# The first argument, if specified, indicates whether you insist on an +# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. +# -std=c++11). If neither is specified, you get whatever works, with +# preference for an extended mode. +# +# The second argument, if specified 'mandatory' or if left unspecified, +# indicates that baseline C++11 support is required and that the macro +# should error out if no mode with that support is found. If specified +# 'optional', then configuration proceeds regardless, after defining +# HAVE_CXX11 if and only if a supporting mode is found. +# +# LICENSE +# +# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com> +# Copyright (c) 2012 Zack Weinberg <zackw@panix.com> +# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu> +# Copyright (c) 2014 Alexey Sokolov <sokolov@google.com> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 4 + +m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[ + template <typename T> + struct check + { + static_assert(sizeof(int) <= sizeof(T), "not big enough"); + }; + + struct Base { + virtual void f() {} + }; + struct Child : public Base { + virtual void f() {} + }; + + typedef check<check<bool>> right_angle_brackets; + + int a; + decltype(a) b; + + typedef check<int> check_type; + check_type c; + check_type&& cr = static_cast<check_type&&>(c); + + auto d = a; + auto l = [](){}; +]]) + +AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl + m4_if([$1], [], [], + [$1], [ext], [], + [$1], [noext], [], + [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl + m4_if([$2], [], [ax_cxx_compile_cxx11_required=true], + [$2], [mandatory], [ax_cxx_compile_cxx11_required=true], + [$2], [optional], [ax_cxx_compile_cxx11_required=false], + [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])]) + AC_LANG_PUSH([C++])dnl + ac_success=no + AC_CACHE_CHECK(whether $CXX supports C++11 features by default, + ax_cv_cxx_compile_cxx11, + [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], + [ax_cv_cxx_compile_cxx11=yes], + [ax_cv_cxx_compile_cxx11=no])]) + if test x$ax_cv_cxx_compile_cxx11 = xyes; then + ac_success=yes + fi + + m4_if([$1], [noext], [], [dnl + if test x$ac_success = xno; then + for switch in -std=gnu++11 -std=gnu++0x; do + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, + $cachevar, + [ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXXFLAGS="$ac_save_CXXFLAGS"]) + if eval test x\$$cachevar = xyes; then + CXXFLAGS="$CXXFLAGS $switch" + CXX11_SWITCH="$switch" + AC_SUBST(CXX11_SWITCH) + ac_success=yes + break + fi + done + fi]) + + m4_if([$1], [ext], [], [dnl + if test x$ac_success = xno; then + for switch in -std=c++11 -std=c++0x; do + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, + $cachevar, + [ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS $switch" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXXFLAGS="$ac_save_CXXFLAGS"]) + if eval test x\$$cachevar = xyes; then + CXXFLAGS="$CXXFLAGS $switch" + CXX11_SWITCH="$switch" + AC_SUBST(CXX11_SWITCH) + ac_success=yes + break + fi + done + fi]) + AC_LANG_POP([C++]) + if test x$ax_cxx_compile_cxx11_required = xtrue; then + if test x$ac_success = xno; then + AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.]) + fi + else + if test x$ac_success = xno; then + HAVE_CXX11=0 + AC_MSG_NOTICE([No compiler with C++11 support was found]) + else + HAVE_CXX11=1 + AC_DEFINE(HAVE_CXX11,1, + [define if the compiler supports basic C++11 syntax]) + fi + + AC_SUBST(HAVE_CXX11) + fi +]) diff --git a/tools/depends/m4/xbmc_arch.m4 b/tools/depends/m4/xbmc_arch.m4 new file mode 100644 index 0000000000..d28f263002 --- /dev/null +++ b/tools/depends/m4/xbmc_arch.m4 @@ -0,0 +1,83 @@ +AC_DEFUN([XBMC_SETUP_ARCH_DEFINES],[ + +# build detection and setup - this is the native arch +case $build in + i*86*-linux-gnu*|i*86*-*-linux-uclibc*) + AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") + ;; + x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*) + AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") + ;; + i386-*-freebsd*) + AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_FREEBSD -D_LINUX") + ;; + amd64-*-freebsd*) + AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_FREEBSD -D_LINUX") + ;; + *86*-apple-darwin*) + AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX") + ;; + powerpc-*-linux-gnu*|powerpc-*-linux-uclibc*) + AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC") + ;; + powerpc64-*-linux-gnu*|powerpc64-*-linux-uclibc*) + AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC64") + ;; + arm*-*-linux-gnu*|arm*-*-linux-uclibc*) + AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") + ;; + *) + AC_MSG_ERROR(unsupported native build platform: $build) +esac + + +# host detection and setup - this is the target arch +case $host in + i*86*-linux-gnu*|i*86*-*-linux-uclibc*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") + ;; + x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*) + 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*|powerpc-*-linux-uclibc*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC") + ;; + powerpc64*-*-linux-gnu*|powerpc64*-*-linux-uclibc*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC64") + ;; + arm*-*-linux-gnu*|arm*-*-linux-uclibc*|aarch64*-*-linux-gnu*|aarch64*-*-linux-uclibc*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") + ;; + mips*-*-linux-gnu*|mips*-*-linux-uclibc*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") + ;; + *-*linux-android*) + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -DTARGET_ANDROID") + ;; + *) + AC_MSG_ERROR(unsupported build target: $host) +esac + +if test "$target_platform" = "target_android" ; then + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -DTARGET_ANDROID") +fi + +if test "$target_platform" = "target_raspberry_pi" ; then + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_ARMEL -DTARGET_RASPBERRY_PI") +fi +]) |