aosp12/device/google/coral/json-c
hcl 7be3fd486c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
..
AUTHORS init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Android.configure.mk init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Android.mk init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
COPYING init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ChangeLog init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Doxyfile init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Makefile.am init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Makefile.am.inc init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
README init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
README-WIN32.html init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
README.html init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
README.md init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
RELEASE_CHECKLIST.txt init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
arraylist.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
arraylist.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
autogen.sh init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
bits.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
check.log init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
config.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
config.h.in init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
configure.ac init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
debug.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
debug.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
json-c-uninstalled.pc.in init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
json-c.pc.in init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
json.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
json_c_version.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
json_c_version.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
json_config.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
json_config.h.in init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
json_inttypes.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
json_object.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
json_object.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
json_object_iterator.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
json_object_iterator.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
json_object_private.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
json_tokener.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
json_tokener.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
json_util.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
json_util.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
libjson.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
linkhash.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
linkhash.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
math_compat.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
printbuf.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
printbuf.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
random_seed.c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
random_seed.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00

README.md

json-c

Building on Unix with git, gcc and autotools

Home page for json-c: https://github.com/json-c/json-c/wiki

Caution: do NOT use sources from svn.metaparadigm.com, they are old.

Prerequisites:

  • gcc, clang, or another C compiler
  • libtool

If you're not using a release tarball, you'll also need:

  • autoconf (autoreconf)
  • automake

Make sure you have a complete libtool install, including libtoolize.

json-c GitHub repo: https://github.com/json-c/json-c

$ git clone https://github.com/json-c/json-c.git
$ cd json-c
$ sh autogen.sh

followed by

$ ./configure
$ make
$ make install

To build and run the test programs:

$ make check

Linking to libjson-c

If your system has pkgconfig, then you can just add this to your makefile:

CFLAGS += $(shell pkg-config --cflags json-c)
LDFLAGS += $(shell pkg-config --libs json-c)

Without pkgconfig, you would do something like this:

JSON_C_DIR=/path/to/json_c/install
CFLAGS += -I$(JSON_C_DIR)/include/json-c
LDFLAGS+= -L$(JSON_C_DIR)/lib -ljson-c