mirror of https://github.com/hak5/openwrt-owl.git
swconfig: Split libsw out of swconfig for reuse in other packages
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> SVN-Revision: 46358owl
parent
63ef3540d1
commit
c71ef0499b
|
@ -42,9 +42,18 @@ define Build/Compile
|
||||||
LIBS="$(TARGET_LDFLAGS) -lnl-tiny -lm -luci"
|
LIBS="$(TARGET_LDFLAGS) -lnl-tiny -lm -luci"
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Build/InstallDev
|
||||||
|
$(INSTALL_DIR) $(1)/usr/include
|
||||||
|
$(CP) $(PKG_BUILD_DIR)/swlib.h $(1)/usr/include/
|
||||||
|
|
||||||
|
$(INSTALL_DIR) $(1)/lib
|
||||||
|
$(CP) $(PKG_BUILD_DIR)/libsw.so $(1)/lib/
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/swconfig/install
|
define Package/swconfig/install
|
||||||
$(INSTALL_DIR) $(1)/sbin $(1)/lib/network
|
$(INSTALL_DIR) $(1)/sbin $(1)/lib/network
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/swconfig $(1)/sbin/swconfig
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/swconfig $(1)/sbin/swconfig
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libsw.so $(1)/lib
|
||||||
$(INSTALL_DATA) ./files/switch.sh $(1)/lib/network/
|
$(INSTALL_DATA) ./files/switch.sh $(1)/lib/network/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,10 @@ LIBS=-lnl -lnl-genl
|
||||||
all: swconfig
|
all: swconfig
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) $(CFLAGS) -c -o $@ $^
|
$(CC) $(CFLAGS) -fPIC -c -o $@ $^
|
||||||
|
|
||||||
swconfig: cli.o swlib.o uci.o
|
libsw.so: swlib.o
|
||||||
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
$(CC) $(CFLAGS) -fPIC -shared -o $@ swlib.o
|
||||||
|
|
||||||
|
swconfig: libsw.so cli.o uci.o
|
||||||
|
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) -L./ -lsw
|
||||||
|
|
Loading…
Reference in New Issue