2011-06-14 10:04:24 +08:00
|
|
|
Building on Unix with git, gcc and autotools
|
2007-03-13 08:26:20 +00:00
|
|
|
|
2011-05-03 21:19:55 +00:00
|
|
|
Home page for json-c:
|
|
|
|
|
http://oss.metaparadigm.com/json-c/
|
|
|
|
|
|
2011-06-14 10:04:24 +08:00
|
|
|
Github repo for json-c:
|
|
|
|
|
https://github.com/json-c/json-c
|
2007-03-13 08:26:20 +00:00
|
|
|
|
2011-06-14 10:04:24 +08:00
|
|
|
$ git clone https://github.com/json-c/json-c.git
|
|
|
|
|
$ cd json-c
|
2011-01-14 18:02:00 +00:00
|
|
|
$ sh autogen.sh
|
2007-03-13 08:26:20 +00:00
|
|
|
|
2011-01-14 18:02:00 +00:00
|
|
|
Then
|
2007-03-13 08:26:20 +00:00
|
|
|
|
2011-01-14 18:02:00 +00:00
|
|
|
$ ./configure
|
|
|
|
|
$ make
|
|
|
|
|
$ make install
|
2007-03-13 08:26:20 +00:00
|
|
|
|
2011-01-14 18:02:00 +00:00
|
|
|
To build and run the test programs run
|
2007-03-13 08:26:20 +00:00
|
|
|
|
2011-01-14 18:02:00 +00:00
|
|
|
$ make check
|
2007-03-13 08:26:20 +00:00
|
|
|
|
|
|
|
|
Linking to libjson
|
|
|
|
|
|
|
|
|
|
If your system has pkgconfig then you can just add this to your makefile
|
|
|
|
|
|
|
|
|
|
CFLAGS += $(shell pkg-config --cflags json)
|
|
|
|
|
LDFLAGS += $(shell pkg-config --libs json)
|