From 22d6d1abf02f0618f33b621ab0cbf877ba6ffe24 Mon Sep 17 00:00:00 2001 From: Yakun Xu Date: Tue, 4 Dec 2018 01:24:22 +0800 Subject: [PATCH] [android] correct version on android (#3340) --- Android.mk | 17 +++ include/openthread-config-android.h | 167 +--------------------------- 2 files changed, 18 insertions(+), 166 deletions(-) diff --git a/Android.mk b/Android.mk index 8a56b284d..f8ab8ae08 100644 --- a/Android.mk +++ b/Android.mk @@ -28,6 +28,20 @@ LOCAL_PATH := $(call my-dir) +OPENTHREAD_DEFAULT_VERSION := $(shell cat $(LOCAL_PATH)/.default-version) +OPENTHREAD_SOURCE_VERSION := $(shell git -C $(LOCAL_PATH) describe --always --match "[0-9].*" 2> /dev/null) + +OPENTHREAD_COMMON_FLAGS := \ + -DPACKAGE=\"openthread\" \ + -DPACKAGE_BUGREPORT=\"openthread-devel@googlegroups.com\" \ + -DPACKAGE_NAME=\"OPENTHREAD\" \ + -DPACKAGE_STRING=\"OPENTHREAD\ $(OPENTHREAD_DEFAULT_VERSION)\" \ + -DPACKAGE_VERSION=\"$(OPENTHREAD_SOURCE_VERSION)\" \ + -DPACKAGE_TARNAME=\"openthread\" \ + -DVERSION=\"$(OPENTHREAD_DEFAULT_VERSION)\" \ + -DPACKAGE_URL=\"http://github.com/openthread/openthread\" \ + $(NULL) + include $(CLEAR_VARS) LOCAL_MODULE := ot-core @@ -49,6 +63,7 @@ LOCAL_CFLAGS := \ -D_GNU_SOURCE \ -DMBEDTLS_CONFIG_FILE=\"mbedtls-config.h\" \ -DOPENTHREAD_CONFIG_FILE=\ \ + $(OPENTHREAD_COMMON_FLAGS) \ -DOPENTHREAD_CONFIG_POSIX_APP_ENABLE_PTY_DEVICE=1 \ -DOPENTHREAD_FTD=1 \ -DOPENTHREAD_POSIX=1 \ @@ -242,6 +257,7 @@ LOCAL_CFLAGS := \ -D_GNU_SOURCE \ -DMBEDTLS_CONFIG_FILE=\"mbedtls-config.h\" \ -DOPENTHREAD_CONFIG_FILE=\ \ + $(OPENTHREAD_COMMON_FLAGS) \ -DOPENTHREAD_CONFIG_POSIX_APP_ENABLE_PTY_DEVICE=1 \ -DOPENTHREAD_FTD=1 \ -DOPENTHREAD_POSIX=1 \ @@ -288,6 +304,7 @@ LOCAL_CFLAGS := \ -D_GNU_SOURCE \ -DMBEDTLS_CONFIG_FILE=\"mbedtls-config.h\" \ -DOPENTHREAD_CONFIG_FILE=\ \ + $(OPENTHREAD_COMMON_FLAGS) \ -DOPENTHREAD_CONFIG_POSIX_APP_ENABLE_PTY_DEVICE=1 \ -DOPENTHREAD_FTD=1 \ -DOPENTHREAD_POSIX=1 \ diff --git a/include/openthread-config-android.h b/include/openthread-config-android.h index c2135caee..01c2e47c1 100644 --- a/include/openthread-config-android.h +++ b/include/openthread-config-android.h @@ -26,66 +26,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -/* Define to 1 if your C++ compiler doesn't accept -c and -o together. */ -/* #undef CXX_NO_MINUS_C_MINUS_O */ - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the `memcpy' function. */ -/* #undef HAVE_MEMCPY */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if stdbool.h conforms to C99. */ -#define HAVE_STDBOOL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define if strlcat exists. */ -/* #undef HAVE_STRLCAT */ - -/* Define if strlcpy exists. */ -/* #undef HAVE_STRLCPY */ - -/* Define if strnlen exists. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if the system has the type `_Bool'. */ -#define HAVE__BOOL 1 - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -/* #undef NO_MINUS_C_MINUS_O */ - /* Define to 1 if you want to enable CoAP to an application. */ -#define OPENTHREAD_ENABLE_APPLICATION_COAP 1 +#define OPENTHREAD_ENABLE_APPLICATION_COAP 0 /* Define to 1 to enable the border agent feature. */ #define OPENTHREAD_ENABLE_BORDER_AGENT 1 @@ -166,112 +108,5 @@ /* OpenThread examples */ #define OPENTHREAD_EXAMPLES none -/* Define to 1 if you want to use cc2538 examples */ -/* #undef OPENTHREAD_EXAMPLES_CC2538 */ - -/* Define to 1 if you want to use cc2650 examples */ -/* #undef OPENTHREAD_EXAMPLES_CC2650 */ - -/* Define to 1 if you want to use cc2652 examples */ -/* #undef OPENTHREAD_EXAMPLES_CC2652 */ - -/* Define to 1 if you want to use da15000 examples */ -/* #undef OPENTHREAD_EXAMPLES_DA15000 */ - -/* Define to 1 if you want to use efr32 examples */ -/* #undef OPENTHREAD_EXAMPLES_EFR32 */ - -/* Define to 1 if you want to use emsk examples */ -/* #undef OPENTHREAD_EXAMPLES_EMSK */ - -/* Define to 1 if you want to use gp712 examples */ -/* #undef OPENTHREAD_EXAMPLES_GP712 */ - -/* Define to 1 if you want to use kw41z examples */ -/* #undef OPENTHREAD_EXAMPLES_KW41Z */ - -/* Define to 1 if you want to use nrf52840 examples */ -/* #undef OPENTHREAD_EXAMPLES_NRF52840 */ - -/* Define to 1 if you want to use posix examples */ -/* #undef OPENTHREAD_EXAMPLES_POSIX */ - -/* Define to 1 if you want to use samr21 examples */ -/* #undef OPENTHREAD_EXAMPLES_SAMR21 */ - -/* Name of package */ -#define PACKAGE "openthread" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "openthread-devel@googlegroups.com" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "OPENTHREAD" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "OPENTHREAD gcf8d4ec" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "openthread" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://github.com/openthread/openthread" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "gcf8d4ec" - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Version number of package */ -#define VERSION "gcf8d4ec" - -/* Define for Solaris 2.5.1 so the uint32_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -/* #undef _UINT32_T */ - -/* Define for Solaris 2.5.1 so the uint64_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -/* #undef _UINT64_T */ - -/* Define for Solaris 2.5.1 so the uint8_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -/* #undef _UINT8_T */ - -/* Define to the type of a signed integer type of width exactly 16 bits if - such a type exists and the standard includes do not define it. */ -/* #undef int16_t */ - -/* Define to the type of a signed integer type of width exactly 32 bits if - such a type exists and the standard includes do not define it. */ -/* #undef int32_t */ - -/* Define to the type of a signed integer type of width exactly 64 bits if - such a type exists and the standard includes do not define it. */ -/* #undef int64_t */ - -/* Define to the type of a signed integer type of width exactly 8 bits if such - a type exists and the standard includes do not define it. */ -/* #undef int8_t */ - -/* Define to the type of an unsigned integer type of width exactly 16 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint16_t */ - -/* Define to the type of an unsigned integer type of width exactly 32 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint32_t */ - -/* Define to the type of an unsigned integer type of width exactly 64 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint64_t */ - -/* Define to the type of an unsigned integer type of width exactly 8 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint8_t */ - /* The settings storage path on android. */ #define OPENTHREAD_CONFIG_POSIX_SETTINGS_PATH "/data/thread"