Bump to 0.12
[platform/upstream/json-c.git] / README
1 Building on Unix with git, gcc and autotools
2
3 Home page for json-c:
4   https://github.com/json-c/json-c/wiki
5
6   Caution: do NOT use sources from svn.metaparadigm.com, they are old.
7
8 Prerequisites:
9         gcc (or another C compiler)
10         libtool
11
12         If you're not using a release tarball, you'll also need:
13         autoconf (autoreconf)
14         automake
15         Make sure you have a complete libtool install, including libtoolize
16
17 Github repo for json-c:
18   https://github.com/json-c/json-c
19
20     $ git clone https://github.com/json-c/json-c.git
21     $ cd json-c
22     $ sh autogen.sh
23
24 Then 
25
26     $ ./configure
27     $ make
28     $ make install
29
30 To build and run the test programs run 
31
32     $ make check
33
34 Linking to libjson-c
35
36 If your system has pkgconfig then you can just add this to your makefile
37
38 CFLAGS += $(shell pkg-config --cflags json-c)
39 LDFLAGS += $(shell pkg-config --libs json-c)
40
41 Without pkgconfig, you would do something like this:
42
43 JSON_C_DIR=/path/to/json_c/install
44 CFLAGS += -I$(JSON_C_DIR)/include/json-c
45 LDFLAGS+= -L$(JSON_C_DIR)/lib -ljson-c