blob: 05ec274418f8da55c1d485b5b40fb47a8e1bbe58 [file] [log] [blame]
Michael Clarke6c76da2011-06-14 10:04:24 +08001Building on Unix with git, gcc and autotools
Michael Clark4504df72007-03-13 08:26:20 +00002
Eric Haszlakiewicza37ddcf2011-05-03 21:19:55 +00003Home page for json-c:
4 http://oss.metaparadigm.com/json-c/
5
Michael Clarke6c76da2011-06-14 10:04:24 +08006Github repo for json-c:
7 https://github.com/json-c/json-c
Michael Clark4504df72007-03-13 08:26:20 +00008
Michael Clarke6c76da2011-06-14 10:04:24 +08009 $ git clone https://github.com/json-c/json-c.git
10 $ cd json-c
Jehiah Czebotarc096f5a2011-01-14 18:02:00 +000011 $ sh autogen.sh
Michael Clark4504df72007-03-13 08:26:20 +000012
Jehiah Czebotarc096f5a2011-01-14 18:02:00 +000013Then
Michael Clark4504df72007-03-13 08:26:20 +000014
Jehiah Czebotarc096f5a2011-01-14 18:02:00 +000015 $ ./configure
16 $ make
17 $ make install
Michael Clark4504df72007-03-13 08:26:20 +000018
Jehiah Czebotarc096f5a2011-01-14 18:02:00 +000019To build and run the test programs run
Michael Clark4504df72007-03-13 08:26:20 +000020
Jehiah Czebotarc096f5a2011-01-14 18:02:00 +000021 $ make check
Michael Clark4504df72007-03-13 08:26:20 +000022
23Linking to libjson
24
25If your system has pkgconfig then you can just add this to your makefile
26
27CFLAGS += $(shell pkg-config --cflags json)
28LDFLAGS += $(shell pkg-config --libs json)