Skip to content

StatiXOS/android_external_json-c

Folders and files

NameName
Last commit message
Last commit date
Jun 14, 2011
Apr 26, 2012
Sep 20, 2020
Jul 30, 2012
Apr 11, 2014
Apr 11, 2014
Apr 9, 2014
Apr 9, 2014
Apr 20, 2014
Sep 8, 2013
Jun 14, 2011
Apr 20, 2014
Apr 12, 2014
May 5, 2014
Oct 7, 2011
Jul 29, 2012
May 5, 2014
Mar 6, 2015
Mar 6, 2015
Apr 11, 2014
Mar 23, 2014
Mar 23, 2014
Jul 29, 2012
Apr 6, 2012
May 5, 2014
Dec 23, 2012
Apr 11, 2014
Mar 6, 2015
Feb 16, 2012
Jun 24, 2013
Apr 20, 2014
Sep 14, 2014
Apr 25, 2012
Apr 30, 2013
Sep 2, 2012
May 5, 2014
Apr 9, 2014
May 5, 2014
May 5, 2014
Sep 10, 2012
Apr 9, 2014
Apr 9, 2014
Mar 22, 2014
May 5, 2014
Apr 3, 2012
Sep 14, 2014
Apr 9, 2014

Repository files navigation

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