Android.configure.mk 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # This file is the top android makefile for all sub-modules.
  2. #
  3. # Suggested settings to build for Android:
  4. #
  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"
  9. #
  10. # Then run autogen.sh, configure and make.
  11. #
  12. LOCAL_PATH := $(call my-dir)
  13. include $(CLEAR_VARS)
  14. json_c_TOP := $(LOCAL_PATH)
  15. JSON_C_BUILT_SOURCES := Android.mk
  16. JSON_C_BUILT_SOURCES := $(patsubst %, $(abspath $(json_c_TOP))/%, $(JSON_C_BUILT_SOURCES))
  17. .PHONY: json-c-configure json-c-configure-real
  18. json-c-configure-real:
  19. echo $(JSON_C_BUILT_SOURCES)
  20. cd $(json_c_TOP) ; \
  21. $(abspath $(json_c_TOP))/autogen.sh && \
  22. CC="$(CONFIGURE_CC)" \
  23. CFLAGS="$(CONFIGURE_CFLAGS)" \
  24. LD=$(TARGET_LD) \
  25. LDFLAGS="$(CONFIGURE_LDFLAGS)" \
  26. CPP=$(CONFIGURE_CPP) \
  27. CPPFLAGS="$(CONFIGURE_CPPFLAGS)" \
  28. PKG_CONFIG_LIBDIR=$(CONFIGURE_PKG_CONFIG_LIBDIR) \
  29. PKG_CONFIG_TOP_BUILD_DIR=/ \
  30. ac_cv_func_malloc_0_nonnull=yes \
  31. ac_cv_func_realloc_0_nonnull=yes \
  32. $(abspath $(json_c_TOP))/$(CONFIGURE) --host=$(CONFIGURE_HOST) \
  33. --prefix=/system \
  34. && \
  35. for file in $(JSON_C_BUILT_SOURCES); do \
  36. rm -f $$file && \
  37. make -C $$(dirname $$file) $$(basename $$file) ; \
  38. done
  39. json-c-configure: json-c-configure-real
  40. PA_CONFIGURE_TARGETS += json-c-configure
  41. -include $(json_c_TOP)/Android.mk