| commit | 846ce27130ba37ea3f401b9b4402407d5fbabe9b | [log] [tgz] |
|---|---|---|
| author | Karsten Tausche <karsten@fairphone.com> | Thu Sep 15 13:51:51 2022 +0200 |
| committer | Karsten Tausche <karsten@fairphone.com> | Thu Mar 07 09:51:45 2024 +0100 |
| tree | ef4f39612efaa3cc46c69e04a410abc1d5eaa2c8 | |
| parent | eb410b353abdc62728a9f1b57c09b67ad8534a22 [diff] |
Explicitly mark unused parameters to resolve warnings Reduce log spam during build. Issue: FP4-A14#5 Change-Id: Id0734c3a5bc08f728ca868a5a18375d8fc16bae6 (cherry picked from commit 4066b180ca0022e2ad72c76fd6b173f549455128)
json-cgit, gcc and autotoolsHome page for json-c: https://github.com/json-c/json-c/wiki
Caution: do NOT use sources from svn.metaparadigm.com, they are old.
Prerequisites:
gcc, clang, or another C compilerlibtoolIf you're not using a release tarball, you'll also need:
autoconf (autoreconf)automakeMake sure you have a complete libtool install, including libtoolize.
json-c GitHub repo: https://github.com/json-c/json-c
$ git clone https://github.com/json-c/json-c.git $ cd json-c $ sh autogen.sh
followed by
$ ./configure $ make $ make install
To build and run the test programs:
$ make check
libjson-cIf your system has pkgconfig, then you can just add this to your makefile:
CFLAGS += $(shell pkg-config --cflags json-c) LDFLAGS += $(shell pkg-config --libs json-c)
Without pkgconfig, you would do something like this:
JSON_C_DIR=/path/to/json_c/install CFLAGS += -I$(JSON_C_DIR)/include/json-c LDFLAGS+= -L$(JSON_C_DIR)/lib -ljson-c