diff options
author | Angelo Mantellini <angelo.mantellini@irt-systemx.fr> | 2018-03-21 14:16:02 +0100 |
---|---|---|
committer | Angelo Mantellini <angelo.mantellini@irt-systemx.fr> | 2018-03-21 20:46:00 +0100 |
commit | 5d308865d0783d0cd70f7453c77980835ac5648e (patch) | |
tree | aea91e7109a81669e5b19443296cf1dec6876532 /config | |
parent | e90a1ec7c82519127b63931a96535ad4bc31342d (diff) |
update android-sdk. Now it is possible to compile with clangandroid-sdk/master
Change-Id: I156aa48dd90467a2a7540eec11839c0111b13bd2
Signed-off-by: Angelo Mantellini <angelo.mantellini@irt-systemx.fr>
Diffstat (limited to 'config')
-rw-r--r-- | config/config.android | 37 | ||||
-rw-r--r-- | config/config.mk | 60 | ||||
-rw-r--r-- | config/modules/002-cmake-modules.mk | 19 | ||||
-rw-r--r-- | config/modules/106-jsoncpp.mk | 1 | ||||
-rw-r--r-- | config/modules/107-libevent.mk | 1 | ||||
-rw-r--r-- | config/modules/108-libxml2.mk | 1 | ||||
-rw-r--r-- | config/modules/109-libhicn.mk | 1 | ||||
-rw-r--r-- | config/modules/510-forwarder.mk (renamed from config/modules/510-Metis.mk) | 0 | ||||
-rw-r--r-- | config/modules/710-http-server.mk | 1 |
9 files changed, 88 insertions, 33 deletions
diff --git a/config/config.android b/config/config.android index ee531cab..47f207a2 100644 --- a/config/config.android +++ b/config/config.android @@ -8,27 +8,28 @@ # # -set(ANDROID_NDK_VERSION "android-ndk-r13b") -set(ANDROID_API_VERSION "android-24") -set(ANDROID_TOOLCHAIN "arm-linux-androideabi") -set(ANDROID_TOOLCHAIN_VERSION "${ANDROID_TOOLCHAIN}-4.9") +#set(ANDROID_NDK_VERSION "android-ndk-r13b") +#set(ANDROID_API_VERSION "android-24") +#set(ANDROID_TOOLCHAIN "arm-linux-androideabi") +#set(ANDROID_TOOLCHAIN_VERSION "${ANDROID_TOOLCHAIN}-4.9") set(ANDROID_API "${ANDROID_API_VERSION}") -set(ANDROID_SDK "$ENV{SDK}") -set(ANDROID_NDK "$ENV{NDK}") -set(ANDROID_NDK_ROOT "${ANDROID_NDK}") +#set(ANDROID_SDK "$ENV{SDK}") +#set(ANDROID_NDK "$ENV{NDK}") +#set(ANDROID_NDK_ROOT "${ANDROID_NDK}") -set(TOOLCHAIN_VERSION_ROOT "${ANDROID_NDK}/toolchains/${ANDROID_TOOLCHAIN_VERSION}") -set(TOOLCHAIN_BIN "${TOOLCHAIN_VERSION_ROOT}/prebuilt/$ENV{OS}-$ENV{ARCH}/bin") +#set(TOOLCHAIN_VERSION_ROOT "${ANDROID_NDK}/toolchains/${ANDROID_TOOLCHAIN_VERSION}") +#set(TOOLCHAIN_BIN "${TOOLCHAIN_VERSION_ROOT}/prebuilt/$ENV{OS}-$ENV{ARCH}/bin") -set(SYSROOT "${ANDROID_NDK}/platforms/${ANDROID_API_VERSION}/arch-arm/") +#set(SYSROOT "${ANDROID_NDK}/platforms/${ANDROID_API_VERSION}/arch-arm/") -set(CMAKE_SYSTEM_NAME Android) -set(CMAKE_SYSROOT "${ANDROID_NDK}/platforms/${ANDROID_API_VERSION}/arch-arm/") -set(CMAKE_C_COMPILER "${TOOLCHAIN_BIN}/${ANDROID_TOOLCHAIN}-gcc") -set(CMAKE_RANLIB "${TOOLCHAIN_BIN}/${ANDROID_TOOLCHAIN}-ranlib") +#set(CMAKE_SYSTEM_NAME Android) +#set(CMAKE_SYSROOT "${ANDROID_NDK}/platforms/${ANDROID_API_VERSION}/arch-arm/") +#set(CMAKE_C_COMPILER "${TOOLCHAIN_BIN}/${ANDROID_TOOLCHAIN}-gcc") +#set(CMAKE_RANLIB "${TOOLCHAIN_BIN}/${ANDROID_TOOLCHAIN}-ranlib") -set(ANDROID_C_FLAGS "--sysroot=${SYSROOT} -Wall -D_ANDROID_ -D_$ENV{ANDROID_API_VERSION}_") +#set(ANDROID_C_FLAGS "--sysroot=${SYSROOT} -Wall -D_ANDROID_ -D_$ENV{ANDROID_API_VERSION}_") + +#set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} "--sysroot=${SYSROOT}") +#set(CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS} "--sysroot=${SYSROOT}") +#set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "--sysroot=${SYSROOT}") -set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} "--sysroot=${SYSROOT}") -set(CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS} "--sysroot=${SYSROOT}") -set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "--sysroot=${SYSROOT}") diff --git a/config/config.mk b/config/config.mk index af30b3f0..4fc382c8 100644 --- a/config/config.mk +++ b/config/config.mk @@ -37,8 +37,19 @@ DISTILLERY_BUILD_NAME?= # This is the directory where things are built. # Note that if some modules don't support off-tree builds you may have problems -DISTILLERY_BUILD_DIR?=${DISTILLERY_ROOT_DIR}/build${DISTILLERY_BUILD_NAME} - +DISTILLERY_BUILD_DIR?=${DISTILLERY_ROOT_DIR}/$(shell if [ "${ANDROID_ARCH}" = "arm64" ]; \ +then echo build_aarch64; \ +else \ +if [ "${ANDROID_ARCH}" = "x86" ]; then \ +echo build_x86; \ +else \ +if [ "${ANDROID_ARCH}" = "x86_64" ]; then \ +echo build_x86_64; \ +else \ +echo build_armv7-a; \ +fi; \ +fi; \ +fi;) # This is the directory where the source is checked out. DISTILLERY_SOURCE_DIR?=${DISTILLERY_ROOT_DIR}/src @@ -51,7 +62,20 @@ MAKE_BUILD_FLAGS?=-j8 # This is the directory where all the ccn software will be installed. This # directory will be DELETED if you do a make clobber. Do not treat this the # same way you would treat a system install directory. -DISTILLERY_INSTALL_DIR?=${DISTILLERY_ROOT_DIR}/usr +DISTILLERY_INSTALL_DIR?=${DISTILLERY_ROOT_DIR}/$(shell if [ "${ANDROID_ARCH}" = "arm64" ]; \ +then echo usr_aarch64; \ +else \ +if [ "${ANDROID_ARCH}" = "x86" ]; then \ +echo usr_i686; \ +else \ +if [ "${ANDROID_ARCH}" = "x86_64" ]; then \ +echo usr_x86_64; \ +else \ +echo usr_armv7-a; \ +fi; \ +fi; \ +fi;) + # DISTILLERY_DEPENDENCIES_DIR=/path/to/dependencies/dir # This is the path to the dependencies directory. It is used as the base for @@ -101,9 +125,33 @@ export ARCH=$(shell uname -m) CCNX_COMPILE_ENVIRONMENT=-DCMAKE_TOOLCHAIN_FILE=${DISTILLERY_ROOT_DIR}/config/config.android OPEN_SSL_DIR=-DOPENSSL_ROOT_DIR=${DISTILLERY_INSTALL_DIR} LIBEVENT_ROOT=${DISTILLERY_INSTALL_DIR} -export ABI=armeabi-v7a +export ABI=$(shell if [ "${ANDROID_ARCH}" = "arm64" ]; \ +then echo arm64; \ +else \ +if [ "${ANDROID_ARCH}" = "x86" ]; then \ +echo x86; \ +else \ +if [ "${ANDROID_ARCH}" = "x86_64" ]; then \ +echo x86_64; \ +else \ +echo arm; \ +fi; \ +fi; \ +fi;) +export ANDROID_ABI=$(shell if [ "${ABI}" = "arm64" ]; then \ +echo arm64-v8a; \ +else \ +if [ "${ANDROID_ARCH}" = "x86" ]; then \ +echo x86; \ +else \ +if [ "${ANDROID_ARCH}" = "x86_64" ]; then \ +echo x86_64; \ +else \ +echo armeabi-v7a; \ +fi; \ +fi; \ +fi;) export QT_HOME=${DISTILLERY_ROOT_DIR}/qt/Qt -export ANDROID_ARCH=armv7 export DISTILLERY_BUILD_DIR export DISTILLERY_INSTALL_DIR -export ANDROID_PLATFORM=android-23 +export ANDROID_PLATFORM=android-26 diff --git a/config/modules/002-cmake-modules.mk b/config/modules/002-cmake-modules.mk index 3378443c..f713af8f 100644 --- a/config/modules/002-cmake-modules.mk +++ b/config/modules/002-cmake-modules.mk @@ -45,14 +45,17 @@ $(eval $1_XCODE_DIR?=${DISTILLERY_XCODE_DIR}/$1) $(eval modules_xcode+=$1) ${$1_BUILD_DIR}/Makefile: ${$1_SOURCE_DIR}/CMakeLists.txt ${DISTILLERY_STAMP} - mkdir -p ${$1_BUILD_DIR} - cd ${$1_BUILD_DIR}; \ - DEPENDENCY_HOME=${DISTILLERY_EXTERN_DIR} \ - ${CMAKE}/cmake ${$1_SOURCE_DIR} \ - -DOPENSSL_ROOT_DIR=OPEN_SSL_DIR \ - ${CMAKE_BUILD_TYPE_FLAG} \ - ${CCNX_COMPILE_ENVIRONMENT} \ - -DCMAKE_INSTALL_PREFIX=${DISTILLERY_INSTALL_DIR} + mkdir -p ${$1_BUILD_DIR}; + echo ${$1_BUILD_DIR}; + cd ${$1_BUILD_DIR}; \ + DEPENDENCY_HOME=${DISTILLERY_EXTERN_DIR} \ + cmake -DCMAKE_TOOLCHAIN_FILE=${NDK}/build/cmake/android.toolchain.cmake \ + -DANDROID_TOOLCHAIN=clang \ + -DANDROID_ABI=${ANDROID_ABI} \ + -DCMAKE_FIND_ROOT_PATH=${DISTILLERY_INSTALL_DIR} \ + -DANDROID_NATIVE_API_LEVEL=26 -DANDROID_API=ON -DINSTALL_HEADER=ON -DHAVE_FSETXATTR=OFF -DHAVE_GLIBC_STRERROR_R=OFF \ + -DICNET=ON -DCMAKE_INSTALL_PREFIX=${DISTILLERY_INSTALL_DIR} ${$1_SOURCE_DIR} -DBUILD_SHARED_LIBS=0 + ${$1_SOURCE_DIR}/CMakeLists.txt: @echo "**option **1" diff --git a/config/modules/106-jsoncpp.mk b/config/modules/106-jsoncpp.mk new file mode 100644 index 00000000..b8c1ef33 --- /dev/null +++ b/config/modules/106-jsoncpp.mk @@ -0,0 +1 @@ +$(eval $(call addCMakeModule,jsoncpp)) diff --git a/config/modules/107-libevent.mk b/config/modules/107-libevent.mk new file mode 100644 index 00000000..a3ee3251 --- /dev/null +++ b/config/modules/107-libevent.mk @@ -0,0 +1 @@ +$(eval $(call addCMakeModule,libevent)) diff --git a/config/modules/108-libxml2.mk b/config/modules/108-libxml2.mk new file mode 100644 index 00000000..09fec5bb --- /dev/null +++ b/config/modules/108-libxml2.mk @@ -0,0 +1 @@ +$(eval $(call addCMakeModule,libxml2)) diff --git a/config/modules/109-libhicn.mk b/config/modules/109-libhicn.mk deleted file mode 100644 index 7c947e22..00000000 --- a/config/modules/109-libhicn.mk +++ /dev/null @@ -1 +0,0 @@ -$(eval $(call addCMakeModule,libhicn)) diff --git a/config/modules/510-Metis.mk b/config/modules/510-forwarder.mk index ba11067e..ba11067e 100644 --- a/config/modules/510-Metis.mk +++ b/config/modules/510-forwarder.mk diff --git a/config/modules/710-http-server.mk b/config/modules/710-http-server.mk new file mode 100644 index 00000000..abf5500a --- /dev/null +++ b/config/modules/710-http-server.mk @@ -0,0 +1 @@ +$(eval $(call addCMakeModule,http-server)) |