Browse Source

Merge pull request #26 from ford-prefect/master

Android build system
tags/json-c-0.11-20130402
Eric Haszlakiewicz 13 years ago
parent
commit
381f77c5bc
5 changed files with 66 additions and 0 deletions
  1. +39
    -0
      Android.configure.mk
  2. +14
    -0
      Makefile.am
  3. +1
    -0
      autogen.sh
  4. +1
    -0
      configure.in
  5. +11
    -0
      json-uninstalled.pc.in

+ 39
- 0
Android.configure.mk View File

@@ -0,0 +1,39 @@
# This file is the top android makefile for all sub-modules.

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

json_c_TOP := $(LOCAL_PATH)

JSON_C_BUILT_SOURCES := Android.mk

JSON_C_BUILT_SOURCES := $(patsubst %, $(abspath $(json_c_TOP))/%, $(JSON_C_BUILT_SOURCES))

.PHONY: json-c-configure json-c-configure-real
json-c-configure-real:
echo $(JSON_C_BUILT_SOURCES)
cd $(json_c_TOP) ; \
$(abspath $(json_c_TOP))/autogen.sh && \
CC="$(CONFIGURE_CC)" \
CFLAGS="$(CONFIGURE_CFLAGS)" \
LD=$(TARGET_LD) \
LDFLAGS="$(CONFIGURE_LDFLAGS)" \
CPP=$(CONFIGURE_CPP) \
CPPFLAGS="$(CONFIGURE_CPPFLAGS)" \
PKG_CONFIG_LIBDIR=$(CONFIGURE_PKG_CONFIG_LIBDIR) \
PKG_CONFIG_TOP_BUILD_DIR=/ \
ac_cv_func_malloc_0_nonnull=yes \
ac_cv_func_realloc_0_nonnull=yes \
$(abspath $(json_c_TOP))/$(CONFIGURE) --host=$(CONFIGURE_HOST) \
--prefix=/system \
&& \
for file in $(JSON_C_BUILT_SOURCES); do \
rm -f $$file && \
make -C $$(dirname $$file) $$(basename $$file) ; \
done

json-c-configure: json-c-configure-real

PA_CONFIGURE_TARGETS += json-c-configure

-include $(json_c_TOP)/Android.mk

+ 14
- 0
Makefile.am View File

@@ -45,3 +45,17 @@ distclean-local:
-rm -rf $(testsubdir) -rm -rf $(testsubdir)
-rm -rf config.h.in~ Makefile.in aclocal.m4 autom4te.cache/ config.guess config.sub configure depcomp install-sh ltmain.sh missing -rm -rf config.h.in~ Makefile.in aclocal.m4 autom4te.cache/ config.guess config.sub configure depcomp install-sh ltmain.sh missing


ANDROID_CFLAGS = -I$(top_srcdir) -DHAVE_CONFIG_H

Android.mk: Makefile.am
androgenizer -:PROJECT json-c \
-:SHARED libjson \
-:TAGS eng debug \
-:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-:SOURCES $(libjson_la_SOURCES) $(nodist_libjson_la_SOURCES) \
-:CFLAGS $(DEFS) $(ANDROID_CFLAGS) $(libjson_la_CFLAGS) \
-:LDFLAGS $(libjson_la_LDFLAGS) $(libjson_la_LIBADD) \
-:HEADER_TARGET json \
-:HEADERS $(libjsoninclude_HEADERS) \
-:PASSTHROUGH LOCAL_ARM_MODE:=arm \
> $@

+ 1
- 0
autogen.sh View File

@@ -1 +1,2 @@
autoreconf -v --install || exit 1 autoreconf -v --install || exit 1
exec ./configure "$@"

+ 1
- 0
configure.in View File

@@ -35,6 +35,7 @@ AC_CONFIG_FILES([
Makefile Makefile
json.pc json.pc
tests/Makefile tests/Makefile
json-uninstalled.pc
]) ])


AC_OUTPUT AC_OUTPUT


+ 11
- 0
json-uninstalled.pc.in View File

@@ -0,0 +1,11 @@
prefix=
exec_prefix=
libdir=@abs_top_builddir@
includedir=@abs_top_srcdir@

Name: json
Description: JSON implementation in C
Version: @VERSION@
Requires:
Libs: -L@abs_top_builddir@ -ljson
Cflags: -I@abs_top_srcdir@

Loading…
Cancel
Save