openwrtv3/package/network/config/swconfig/src/Makefile
Felix Fietkau e82c8d6e20 swconfig: replace the shared library with a static one
Reduces binary size

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-12-14 12:13:13 +01:00

16 lines
256 B
Makefile

ifndef CFLAGS
CFLAGS = -O2 -g -I ../src
endif
LIBS=-lnl -lnl-genl
all: swconfig
%.o: %.c
$(CC) $(CFLAGS) -fPIC -c -o $@ $^
libsw.a: swlib.o
$(AR) rcu $@ swlib.o
$(RANLIB) $@
swconfig: libsw.a cli.o uci.o
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) -L./ -lsw