luci-lib-luaneightbl: add src Makefile and fix dependencies (#282)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
parent
db653649ff
commit
3c6d03ddee
2 changed files with 18 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
17
libs/luci-lib-luaneightbl/src/Makefile
Normal file
17
libs/luci-lib-luaneightbl/src/Makefile
Normal file
|
@ -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
|
Loading…
Reference in a new issue