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 16 Github repo for json-c: 17 https://github.com/json-c/json-c 18 19 $ git clone https://github.com/json-c/json-c.git 20 $ cd json-c 21 $ sh autogen.sh 22 23 Then 24 25 $ ./configure 26 $ make 27 $ make install 28 29 To build and run the test programs run 30 31 $ make check 32 33 Linking to libjson-c 34 35 If your system has pkgconfig then you can just add this to your makefile 36 37 CFLAGS += $(shell pkg-config --cflags json-c) 38 LDFLAGS += $(shell pkg-config --libs json-c) 39 40 Without pkgconfig, you would do something like this: 41 42 JSON_C_DIR=/path/to/json_c/install 43 CFLAGS += -I$(JSON_C_DIR)/include/json-c 44 LDFLAGS+= -L$(JSON_C_DIR)/lib -ljson-c
This page was automatically generated by LXR 0.3.1. • OpenWrt