| Michael Clark | 4504df7 | 2007-03-13 08:26:20 +0000 | [diff] [blame] | 1 | Building on Unix with gcc and autotools |
| 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 | |
| Jehiah Czebotar | c096f5a | 2011-01-14 18:02:00 +0000 | [diff] [blame] | 6 | If checking out from SVN (http://svn.metaparadigm.com/svn/json-c/trunk) or Git (https://github.com/jehiah/json-c): |
| Michael Clark | 4504df7 | 2007-03-13 08:26:20 +0000 | [diff] [blame] | 7 | |
| Jehiah Czebotar | c096f5a | 2011-01-14 18:02:00 +0000 | [diff] [blame] | 8 | $ sh autogen.sh |
| Michael Clark | 4504df7 | 2007-03-13 08:26:20 +0000 | [diff] [blame] | 9 | |
| Jehiah Czebotar | c096f5a | 2011-01-14 18:02:00 +0000 | [diff] [blame] | 10 | Then |
| Michael Clark | 4504df7 | 2007-03-13 08:26:20 +0000 | [diff] [blame] | 11 | |
| Jehiah Czebotar | c096f5a | 2011-01-14 18:02:00 +0000 | [diff] [blame] | 12 | $ ./configure |
| 13 | $ make |
| 14 | $ make install |
| Michael Clark | 4504df7 | 2007-03-13 08:26:20 +0000 | [diff] [blame] | 15 | |
| Jehiah Czebotar | c096f5a | 2011-01-14 18:02:00 +0000 | [diff] [blame] | 16 | To build and run the test programs run |
| Michael Clark | 4504df7 | 2007-03-13 08:26:20 +0000 | [diff] [blame] | 17 | |
| Jehiah Czebotar | c096f5a | 2011-01-14 18:02:00 +0000 | [diff] [blame] | 18 | $ make check |
| Michael Clark | 4504df7 | 2007-03-13 08:26:20 +0000 | [diff] [blame] | 19 | |
| 20 | Linking to libjson |
| 21 | |
| 22 | If your system has pkgconfig then you can just add this to your makefile |
| 23 | |
| 24 | CFLAGS += $(shell pkg-config --cflags json) |
| 25 | LDFLAGS += $(shell pkg-config --libs json) |