2012-02-27 03:34:38 +00:00
|
|
|
# Included by top-level Android.mk
|
|
|
|
|
2014-03-03 01:42:56 +00:00
|
|
|
LOCAL_PATH := $(call my-dir)
|
|
|
|
include $(CLEAR_VARS)
|
2016-09-23 03:27:52 +00:00
|
|
|
|
Add iOS Framework Bundle build
The new ios/configure script performs a separate ../configure for each of
the following iOS targets:
iPhoneOS on armv7
iPhoneOS on arm64
iPhoneSimulator on i386
iPhoneSimulator on x86_64
The script then creates ios/Makefile that builds a static iOS Framework
Bundle suitable for inclusion in an Xcode iOS project.
Add the --xcode-sdk=SDK option to configure.ac, to support cross
compiling using Apple Xcode. It prefixes all compile/link toolchain
commands with the "xcrun --sdk SDK" command, ie, CC, AS, LD, AR, RANLIB,
etc.
Re-structure headerfiles.mk to separate "public" from "private" headers,
because the Framework module only exposes the public ones. Moves the
SQLITE3_AMALGAMATION definition from Makefile.in into headerfiles.mk.
Update INSTALL.md and add a technical document for Apple iOS.
This enables development of Serval DNA within the context of an Xcode
iOS project using the standard edit-make-test cycle: after modifying a
Serval DNA source file, "cd ios; make" will recompile the changed file
for all the target architectures and update the Framework Bundle.
Rebuilding the Xcode project will then incorporate the changes, which
can be tested immediately.
2016-10-25 02:22:21 +00:00
|
|
|
include $(LOCAL_PATH)/headerfiles.mk # for SQLITE3_AMALGAMATION
|
2016-09-23 03:27:52 +00:00
|
|
|
|
2014-03-03 01:42:56 +00:00
|
|
|
include $(LOCAL_PATH)/sourcefiles.mk
|
Add iOS Framework Bundle build
The new ios/configure script performs a separate ../configure for each of
the following iOS targets:
iPhoneOS on armv7
iPhoneOS on arm64
iPhoneSimulator on i386
iPhoneSimulator on x86_64
The script then creates ios/Makefile that builds a static iOS Framework
Bundle suitable for inclusion in an Xcode iOS project.
Add the --xcode-sdk=SDK option to configure.ac, to support cross
compiling using Apple Xcode. It prefixes all compile/link toolchain
commands with the "xcrun --sdk SDK" command, ie, CC, AS, LD, AR, RANLIB,
etc.
Re-structure headerfiles.mk to separate "public" from "private" headers,
because the Framework module only exposes the public ones. Moves the
SQLITE3_AMALGAMATION definition from Makefile.in into headerfiles.mk.
Update INSTALL.md and add a technical document for Apple iOS.
This enables development of Serval DNA within the context of an Xcode
iOS project using the standard edit-make-test cycle: after modifying a
Serval DNA source file, "cd ios; make" will recompile the changed file
for all the target architectures and update the Framework Bundle.
Rebuilding the Xcode project will then incorporate the changes, which
can be tested immediately.
2016-10-25 02:22:21 +00:00
|
|
|
|
2014-03-04 11:23:01 +00:00
|
|
|
SERVALD_SRC_FILES = \
|
|
|
|
$(SQLITE3_SOURCES) \
|
|
|
|
$(SERVAL_CLIENT_SOURCES) \
|
2014-05-23 08:19:00 +00:00
|
|
|
$(MDP_CLIENT_SOURCES) \
|
2014-03-04 11:23:01 +00:00
|
|
|
$(SERVAL_DAEMON_SOURCES) \
|
2016-10-20 02:49:26 +00:00
|
|
|
$(SERVAL_DAEMON_JNI_SOURCES) \
|
2016-10-17 07:10:28 +00:00
|
|
|
$(ANDROID_SOURCES)
|
2016-09-23 03:27:52 +00:00
|
|
|
SQLITE3_INC := $(LOCAL_PATH)/$(SQLITE3_AMALGAMATION)
|
2012-02-27 03:34:38 +00:00
|
|
|
|
2012-05-20 04:35:04 +00:00
|
|
|
SERVALD_LOCAL_CFLAGS = \
|
2012-05-28 03:29:38 +00:00
|
|
|
-g \
|
2016-11-07 00:08:23 +00:00
|
|
|
-Wall -Werror -Wextra -Wformat \
|
|
|
|
-Wno-empty-body \
|
|
|
|
-Wno-unused-value \
|
|
|
|
-Wno-unused-function \
|
|
|
|
-Wno-unused-parameter \
|
|
|
|
-Wno-unused-variable \
|
|
|
|
-Wno-missing-field-initializers \
|
|
|
|
-Wno-deprecated-declarations \
|
|
|
|
-Wno-unknown-attributes \
|
2013-12-06 04:38:40 +00:00
|
|
|
-DSERVALD_VERSION="\"Android\"" -DSERVALD_COPYRIGHT="\"Android\"" \
|
2016-04-04 01:38:01 +00:00
|
|
|
-DINSTANCE_PATH="\"/data/data/org.servalproject/var/serval-node\"" \
|
2016-11-14 00:56:28 +00:00
|
|
|
-DSERVAL_ENABLE_DEBUG=1 \
|
2012-02-27 03:34:38 +00:00
|
|
|
-DSHELL -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" \
|
|
|
|
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" \
|
2015-11-23 02:48:30 +00:00
|
|
|
-DHAVE_FUNC_ATTRIBUTE_ERROR=1 \
|
|
|
|
-DHAVE_FUNC_ATTRIBUTE_ALIGNED=1 -DHAVE_VAR_ATTRIBUTE_SECTION=1 -DHAVE_FUNC_ATTRIBUTE_USED=1 \
|
|
|
|
-DHAVE_FUNC_ATTRIBUTE_ALLOC_SIZE=1 -DHAVE_FUNC_ATTRIBUTE_MALLOC=1 \
|
|
|
|
-DHAVE_FUNC_ATTRIBUTE_FORMAT=1 \
|
|
|
|
-DHAVE_FUNC_ATTRIBUTE_USED=1 -DHAVE_FUNC_ATTRIBUTE_UNUSED=1 \
|
2012-02-27 03:34:38 +00:00
|
|
|
-DHAVE_LIBC=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 \
|
|
|
|
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 \
|
|
|
|
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDIO_H=1 \
|
|
|
|
-DHAVE_ERRNO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRINGS_H=1 -DHAVE_UNISTD_H=1 \
|
|
|
|
-DHAVE_STRING_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_SOCKET_H=1 \
|
|
|
|
-DHAVE_SYS_MMAN_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_POLL_H=1 -DHAVE_NETDB_H=1 \
|
2012-05-16 01:52:10 +00:00
|
|
|
-DHAVE_JNI_H=1 -DHAVE_STRUCT_UCRED=1 -DHAVE_CRYPTO_SIGN_NACL_GE25519_H=1 \
|
2013-09-18 07:06:28 +00:00
|
|
|
-DBYTE_ORDER=_BYTE_ORDER -DHAVE_LINUX_STRUCT_UCRED -DUSE_ABSTRACT_NAMESPACE \
|
2016-11-07 00:08:23 +00:00
|
|
|
-DHAVE_BCOPY -DHAVE_BZERO -DHAVE_BCMP -DHAVE_NETINET_IN_H -DHAVE_LSEEK64 -DSIZEOF_OFF_T=4 \
|
2017-06-06 05:44:17 +00:00
|
|
|
-DHAVE_STRLCPY=1 \
|
2016-10-17 07:10:28 +00:00
|
|
|
-DHAVE_GETTID=1 \
|
2015-10-12 06:12:19 +00:00
|
|
|
-DHAVE_LINUX_IF_H -DHAVE_SYS_STAT_H -DHAVE_SYS_VFS_H -DHAVE_LINUX_NETLINK_H -DHAVE_LINUX_RTNETLINK_H \
|
2014-06-30 00:44:12 +00:00
|
|
|
-DSQLITE_OMIT_DATETIME_FUNCS -DSQLITE_OMIT_COMPILEOPTION_DIAGS -DSQLITE_OMIT_DEPRECATED \
|
|
|
|
-DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_VIRTUALTABLE -DSQLITE_OMIT_AUTHORIZATION \
|
2012-02-27 03:34:38 +00:00
|
|
|
-I$(SQLITE3_INC)
|
|
|
|
|
2016-04-18 06:35:37 +00:00
|
|
|
SERVALD_LOCAL_LDLIBS = -L$(SYSROOT)/usr/lib -llog
|
|
|
|
SERVALD_LOCAL_STATIC_LIBRARIES += sodium
|
2012-02-27 03:34:38 +00:00
|
|
|
|
2018-04-03 06:07:14 +00:00
|
|
|
# Build libservaldtatic.a
|
2012-05-20 04:35:04 +00:00
|
|
|
include $(CLEAR_VARS)
|
2016-04-18 06:35:37 +00:00
|
|
|
LOCAL_STATIC_LIBRARIES := $(SERVALD_LOCAL_STATIC_LIBRARIES)
|
2016-10-17 07:10:28 +00:00
|
|
|
LOCAL_SRC_FILES := $(SERVALD_SRC_FILES) version_servald.c
|
2014-03-03 01:42:56 +00:00
|
|
|
LOCAL_CFLAGS += $(SERVALD_LOCAL_CFLAGS)
|
2016-04-18 06:35:37 +00:00
|
|
|
LOCAL_C_INCLUDES += $(SODIUM_INCLUDE)
|
2018-04-03 06:07:14 +00:00
|
|
|
LOCAL_MODULE := servaldstatic
|
|
|
|
include $(BUILD_STATIC_LIBRARY)
|