diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-01-26 16:49:23 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-01-26 16:49:23 +0100 |
commit | 73b19f63822d511028baa8e3e7463d4e0a3ff857 (patch) | |
tree | d3264536c3a4b49ee1e9ee71547229f0fe98b26b /libs/luci-lib-jsonc/src/Makefile | |
parent | 8c8c69fa5d69113617fd9a897b843f22d44c76a6 (diff) |
libs: add luci-lib-jsonc, a Lua binding for JSON-C
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'libs/luci-lib-jsonc/src/Makefile')
-rw-r--r-- | libs/luci-lib-jsonc/src/Makefile | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libs/luci-lib-jsonc/src/Makefile b/libs/luci-lib-jsonc/src/Makefile new file mode 100644 index 0000000000..e15fbac382 --- /dev/null +++ b/libs/luci-lib-jsonc/src/Makefile @@ -0,0 +1,17 @@ +JSONC_CFLAGS = -std=gnu99 -I$(STAGING_DIR)/usr/include/json-c/ +JSONC_LDFLAGS = -llua -lm -ljson-c +JSONC_OBJ = jsonc.o +JSONC_LIB = jsonc.so + +%.o: %.c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LUA_CFLAGS) $(JSONC_CFLAGS) $(FPIC) -c -o $@ $< + +compile: $(JSONC_OBJ) + $(CC) $(LDFLAGS) -shared -o $(JSONC_LIB) $(JSONC_OBJ) $(JSONC_LDFLAGS) + +install: compile + mkdir -p $(DESTDIR)/usr/lib/lua/luci + cp $(JSONC_LIB) $(DESTDIR)/usr/lib/lua/luci/$(JSONC_LIB) + +clean: + rm -f *.o *.so |