| Michael Clark | e6c76da | 2011-06-14 10:04:24 +0800 | [diff] [blame^] | 1 | Building on Unix with git, gcc and autotools |
| Michael Clark | 4504df7 | 2007-03-13 08:26:20 +0000 | [diff] [blame] | 2 | |
| Eric Haszlakiewicz | a37ddcf | 2011-05-03 21:19:55 +0000 | [diff] [blame] | 3 | Home page for json-c: |
| 4 | http://oss.metaparadigm.com/json-c/ | ||||
| 5 | |||||
| Michael Clark | e6c76da | 2011-06-14 10:04:24 +0800 | [diff] [blame^] | 6 | Github repo for json-c: |
| 7 | https://github.com/json-c/json-c | ||||
| Michael Clark | 4504df7 | 2007-03-13 08:26:20 +0000 | [diff] [blame] | 8 | |
| Michael Clark | e6c76da | 2011-06-14 10:04:24 +0800 | [diff] [blame^] | 9 | $ git clone https://github.com/json-c/json-c.git |
| 10 | $ cd json-c | ||||
| Jehiah Czebotar | c096f5a | 2011-01-14 18:02:00 +0000 | [diff] [blame] | 11 | $ sh autogen.sh |
| Michael Clark | 4504df7 | 2007-03-13 08:26:20 +0000 | [diff] [blame] | 12 | |
| Jehiah Czebotar | c096f5a | 2011-01-14 18:02:00 +0000 | [diff] [blame] | 13 | Then |
| Michael Clark | 4504df7 | 2007-03-13 08:26:20 +0000 | [diff] [blame] | 14 | |
| Jehiah Czebotar | c096f5a | 2011-01-14 18:02:00 +0000 | [diff] [blame] | 15 | $ ./configure |
| 16 | $ make | ||||
| 17 | $ make install | ||||
| Michael Clark | 4504df7 | 2007-03-13 08:26:20 +0000 | [diff] [blame] | 18 | |
| Jehiah Czebotar | c096f5a | 2011-01-14 18:02:00 +0000 | [diff] [blame] | 19 | To build and run the test programs run |
| Michael Clark | 4504df7 | 2007-03-13 08:26:20 +0000 | [diff] [blame] | 20 | |
| Jehiah Czebotar | c096f5a | 2011-01-14 18:02:00 +0000 | [diff] [blame] | 21 | $ make check |
| Michael Clark | 4504df7 | 2007-03-13 08:26:20 +0000 | [diff] [blame] | 22 | |
| 23 | Linking to libjson | ||||
| 24 | |||||
| 25 | If your system has pkgconfig then you can just add this to your makefile | ||||
| 26 | |||||
| 27 | CFLAGS += $(shell pkg-config --cflags json) | ||||
| 28 | LDFLAGS += $(shell pkg-config --libs json) | ||||