1 # This file is the top android makefile for all sub-modules.
3 # Suggested settings to build for Android:
5 # export PATH=$PATH:/opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/
6 # export SYSROOT=/opt/android-ndk/platforms/android-9/arch-arm/usr/
7 # export LD=arm-linux-androideabi-ld
8 # export CC="arm-linux-androideabi-gcc --sysroot=/opt/android-ndk/platforms/android-9/arch-arm"
10 # Then run autogen.sh, configure and make.
13 LOCAL_PATH := $(call my-dir)
16 json_c_TOP := $(LOCAL_PATH)
18 JSON_C_BUILT_SOURCES := Android.mk
20 JSON_C_BUILT_SOURCES := $(patsubst %, $(abspath $(json_c_TOP))/%, $(JSON_C_BUILT_SOURCES))
22 .PHONY: json-c-configure json-c-configure-real
23 json-c-configure-real:
24 echo $(JSON_C_BUILT_SOURCES)
26 $(abspath $(json_c_TOP))/autogen.sh && \
27 CC="$(CONFIGURE_CC)" \
28 CFLAGS="$(CONFIGURE_CFLAGS)" \
30 LDFLAGS="$(CONFIGURE_LDFLAGS)" \
31 CPP=$(CONFIGURE_CPP) \
32 CPPFLAGS="$(CONFIGURE_CPPFLAGS)" \
33 PKG_CONFIG_LIBDIR=$(CONFIGURE_PKG_CONFIG_LIBDIR) \
34 PKG_CONFIG_TOP_BUILD_DIR=/ \
35 ac_cv_func_malloc_0_nonnull=yes \
36 ac_cv_func_realloc_0_nonnull=yes \
37 $(abspath $(json_c_TOP))/$(CONFIGURE) --host=$(CONFIGURE_HOST) \
40 for file in $(JSON_C_BUILT_SOURCES); do \
42 make -C $$(dirname $$file) $$(basename $$file) ; \
45 json-c-configure: json-c-configure-real
47 PA_CONFIGURE_TARGETS += json-c-configure
49 -include $(json_c_TOP)/Android.mk