On Wed, Jul 8, 2015 at 8:37 AM, Alexandru Ardelean
<[email protected]> wrote:
> From: Helmut Schaa <[email protected]>
>
> Signed-off-by: Helmut Schaa <[email protected]>

Just for completeness here's my SoB.

Signed-off-by: Helmut Schaa <[email protected]>


Helmut

> ---
>  package/network/config/swconfig/Makefile     | 9 +++++++++
>  package/network/config/swconfig/src/Makefile | 9 ++++++---
>  2 files changed, 15 insertions(+), 3 deletions(-)
>
> diff --git a/package/network/config/swconfig/Makefile 
> b/package/network/config/swconfig/Makefile
> index 50d395c..5af31f7 100644
> --- a/package/network/config/swconfig/Makefile
> +++ b/package/network/config/swconfig/Makefile
> @@ -41,9 +41,18 @@ define Build/Compile
>                 LIBS="$(TARGET_LDFLAGS) -lnl-tiny -lm -luci"
>  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
>         $(INSTALL_DIR) $(1)/sbin $(1)/lib/network
>         $(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/
>  endef
>
> diff --git a/package/network/config/swconfig/src/Makefile 
> b/package/network/config/swconfig/src/Makefile
> index 0d56f43..1176bf0 100644
> --- a/package/network/config/swconfig/src/Makefile
> +++ b/package/network/config/swconfig/src/Makefile
> @@ -6,7 +6,10 @@ LIBS=-lnl -lnl-genl
>  all: swconfig
>
>  %.o: %.c
> -       $(CC) $(CFLAGS) -c -o $@ $^
> +       $(CC) $(CFLAGS) -fPIC -c -o $@ $^
>
> -swconfig: cli.o swlib.o uci.o
> -       $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
> +libsw.so: swlib.o
> +       $(CC) $(CFLAGS) -fPIC -shared -o $@ swlib.o
> +
> +swconfig: libsw.so cli.o uci.o
> +       $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) -L./ -lsw
> --
> 2.1.4
>
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to