From 3c6d03ddee6ba4a536b687b17aa5a41f1f2d1575 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 9 Jan 2015 13:04:01 +0100 Subject: [PATCH] luci-lib-luaneightbl: add src Makefile and fix dependencies (#282) Signed-off-by: Jo-Philipp Wich --- libs/luci-lib-luaneightbl/Makefile | 2 +- libs/luci-lib-luaneightbl/src/Makefile | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 libs/luci-lib-luaneightbl/src/Makefile diff --git a/libs/luci-lib-luaneightbl/Makefile b/libs/luci-lib-luaneightbl/Makefile index d9ab98079..f0185b86a 100644 --- a/libs/luci-lib-luaneightbl/Makefile +++ b/libs/luci-lib-luaneightbl/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=neightbl - Lua lib for IPv6 neighbors -LUCI_DEPENDS:=+luci-base +LUCI_DEPENDS:=+liblua include ../../luci.mk diff --git a/libs/luci-lib-luaneightbl/src/Makefile b/libs/luci-lib-luaneightbl/src/Makefile new file mode 100644 index 000000000..f856d2fa2 --- /dev/null +++ b/libs/luci-lib-luaneightbl/src/Makefile @@ -0,0 +1,17 @@ +NEIGHTBL_CFLAGS = -std=gnu99 +NEIGHTBL_LDFLAGS = -llua -lm +NEIGHTBL_OBJ = neightbl.o +NEIGHTBL_LIB = neightbl.so + +%.o: %.c + $(CC) $(CPPFLAGS) $(CFLAGS) $(LUA_CFLAGS) $(NEIGHTBL_CFLAGS) $(FPIC) -c -o $@ $< + +compile: $(NEIGHTBL_OBJ) + $(CC) $(LDFLAGS) -shared -o $(NEIGHTBL_LIB) $(NEIGHTBL_OBJ) $(NEIGHTBL_LDFLAGS) + +install: compile + mkdir -p $(DESTDIR)/usr/lib/lua + cp $(NEIGHTBL_LIB) $(DESTDIR)/usr/lib/lua/$(NEIGHTBL_LIB) + +clean: + rm -f *.o *.so -- 2.25.1