summaryrefslogtreecommitdiffhomepage
path: root/libs/luci-lib-ip/src/Makefile
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-01-22 14:59:13 +0100
committerJo-Philipp Wich <jow@openwrt.org>2015-01-22 15:01:50 +0100
commit0ff02e3a13d11466fe8997932a7f9828f53f3ee8 (patch)
tree036041746034b051bc8baaa14c77d6a16cbe29da /libs/luci-lib-ip/src/Makefile
parent390c4bd5a7e1e53bc9e765a3b5ee8f59f46d5598 (diff)
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 <jow@openwrt.org>
Diffstat (limited to 'libs/luci-lib-ip/src/Makefile')
-rw-r--r--libs/luci-lib-ip/src/Makefile17
1 files changed, 17 insertions, 0 deletions
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