| commit | 8d46a3c691776bcda7ad0e55c481b41d41235e33 | [log] [tgz] |
|---|---|---|
| author | Eruvaram Kumar Raja Reddy <erajared@codeaurora.org> | Fri Aug 13 18:27:10 2021 +0530 |
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | Wed Sep 29 16:33:01 2021 -0700 |
| tree | 405c963f163066a33bc883df0889415e7daab24d | |
| parent | a5f864baa7b8fb501341355edd6d4967f68bba10 [diff] |
json-c: compilation fix for qssi target FAILED: ninja: 'out/target/product/qssi/obj/KERNEL_OBJ/usr', needed by 'out/target/product/qssi/obj/SHARED_LIBRARIES/libjson_intermediates/arraylist.o', missing and no known rule to make it Change-Id: I80357feaa424dd5b126dda9f508690ccf21affb5
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