99 lines
2.8 KiB
Makefile
99 lines
2.8 KiB
Makefile
# Makefile to build precompiled libraries, which cannot be built using standard NDK makefiles
|
|
# TODO: libboost, libffmpeg, libpython (used only in GemRB)
|
|
|
|
ARCHES32 := armeabi-v7a x86
|
|
ARCHES64 := arm64-v8a x86_64
|
|
|
|
ICONV := $(foreach ARCH, $(ARCHES32) $(ARCHES64), iconv/lib/$(ARCH)/libiconv.so iconv/lib/$(ARCH)/libcharset.so)
|
|
|
|
ICU_LIBS := icudata icui18n icuio icutest icutu icuuc iculx icu-le-hb harfbuzz
|
|
ICU := $(foreach ARCH, $(ARCHES32) $(ARCHES64), $(foreach NAME, $(ICU_LIBS), icuuc/lib/$(ARCH)/lib$(NAME).a))
|
|
|
|
OPENSSL := $(foreach ARCH, $(ARCHES32) $(ARCHES64), openssl/lib-$(ARCH)/libcrypto.so.sdl.1.so openssl/lib-$(ARCH)/libssl.so.sdl.1.so)
|
|
|
|
LIBS := $(ICONV) $(ICU) $(OPENSSL)
|
|
|
|
.PHONY: all boost openssl icu
|
|
all: $(LIBS)
|
|
|
|
openssl: $(OPENSSL)
|
|
|
|
icu: $(ICONV) $(ICU)
|
|
|
|
#.NOTPARALLEL: $(LIBS) $(BOOST)
|
|
|
|
$(ICONV) $(ICU): iconv/src/build.sh
|
|
cd iconv/src && \
|
|
./build.sh && \
|
|
for ARCH in $(ARCHES32) $(ARCHES64); do \
|
|
mkdir -p ../lib/$$ARCH ../include ; \
|
|
cp -f $$ARCH/libiconv.so $$ARCH/libcharset.so ../lib/$$ARCH/ ; \
|
|
cp -f $$ARCH/include/*.h ../include/ ; \
|
|
mkdir -p ../../icuuc/lib/$$ARCH ../../icuuc/include/unicode ../../icuuc/include/layout ; \
|
|
cp -f $$ARCH/libicu*.a $$ARCH/libharfbuzz.a ../../icuuc/lib/$$ARCH/ ; \
|
|
cp -f $$ARCH/include/unicode/*.h ../../icuuc/include/unicode/ ; \
|
|
cp -f $$ARCH/include/layout/*.h ../../icuuc/include/layout/ ; \
|
|
cp -f $$ARCH/include/icu-le-hb/layout/*.h ../../icuuc/include/layout/ ; \
|
|
done
|
|
|
|
$(OPENSSL): openssl/compile.sh
|
|
cd openssl && ./compile.sh
|
|
|
|
BOOST_LIBS := \
|
|
atomic \
|
|
chrono \
|
|
container \
|
|
context \
|
|
contract \
|
|
coroutine \
|
|
date_time \
|
|
exception \
|
|
fiber \
|
|
filesystem \
|
|
graph \
|
|
iostreams \
|
|
locale \
|
|
log \
|
|
log_setup \
|
|
math_c99 \
|
|
math_c99f \
|
|
math_c99l \
|
|
math_tr1 \
|
|
math_tr1f \
|
|
math_tr1l \
|
|
prg_exec_monitor \
|
|
program_options \
|
|
random \
|
|
regex \
|
|
serialization \
|
|
stacktrace_basic \
|
|
stacktrace_noop \
|
|
system \
|
|
test_exec_monitor \
|
|
thread \
|
|
timer \
|
|
type_erasure \
|
|
unit_test_framework \
|
|
wave \
|
|
wserialization \
|
|
|
|
|
|
BOOST := $(foreach ARCH, $(ARCHES32) $(ARCHES64), $(foreach NAME, $(BOOST_LIBS), boost/lib/$(ARCH)/libboost_$(NAME).a))
|
|
|
|
$(BOOST): boost/src/build-android.sh
|
|
rm -rf boost/include boost/lib ; \
|
|
cd boost/src && \
|
|
./build-android.sh --boost=1.69.0 --with-iconv --arch=$(shell echo $(foreach ARCH, $(ARCHES32) $(ARCHES64),$(ARCH),) | tr -d ' ') && \
|
|
for ARCH in $(ARCHES32) $(ARCHES64); do \
|
|
mkdir -p ../lib/$$ARCH ../include ; \
|
|
$(foreach NAME, $(BOOST_LIBS), cp -f build/out/$$ARCH/lib/libboost_$(NAME)-clang-mt-*.a ../lib/$$ARCH/libboost_$(NAME).a || exit 1 ;) \
|
|
cp -r -f build/out/$$ARCH/include/boost-*/* ../include/ || exit 1 ; \
|
|
done || exit 1 ; \
|
|
$(foreach NAME, $(BOOST_LIBS), ln -sf boost ../../boost_$(NAME) ;)
|
|
|
|
boost: $(BOOST)
|
|
|
|
iconv/src/build.sh boost/src/build-android.sh:
|
|
git submodule update --init --recursive
|
|
|