From 0ff02e3a13d11466fe8997932a7f9828f53f3ee8 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 22 Jan 2015 14:59:13 +0100 Subject: libs: add luci-lib-ip Add new luci.ip library which is an api compatible C reimplementation of ip.lua. It also supports dumping the system routing table and neighbour entry database via netlink. Signed-off-by: Jo-Philipp Wich --- libs/luci-lib-ip/src/Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 libs/luci-lib-ip/src/Makefile (limited to 'libs/luci-lib-ip/src/Makefile') diff --git a/libs/luci-lib-ip/src/Makefile b/libs/luci-lib-ip/src/Makefile new file mode 100644 index 0000000000..76abd27d2a --- /dev/null +++ b/libs/luci-lib-ip/src/Makefile @@ -0,0 +1,17 @@ +IP_CFLAGS = -std=gnu99 -I$(STAGING_DIR)/usr/include/libnl-tiny/ +IP_LDFLAGS = -llua -lm -lnl-tiny +IP_OBJ = ip.o +IP_LIB = ip.so + +%.o: %.c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LUA_CFLAGS) $(IP_CFLAGS) $(FPIC) -c -o $@ $< + +compile: $(IP_OBJ) + $(CC) $(LDFLAGS) -shared -o $(IP_LIB) $(IP_OBJ) $(IP_LDFLAGS) + +install: compile + mkdir -p $(DESTDIR)/usr/lib/lua/luci + cp $(IP_LIB) $(DESTDIR)/usr/lib/lua/luci/$(IP_LIB) + +clean: + rm -f *.o *.so -- cgit v1.2.3