4 WOPTS=-pedantic -Wno-unused -Werror
6 CFLAGS=$(COPTS) $(WOPTS) -Wall -std=gnu99
16 CFLAGS += -g3 -DDEBUG_ALL
26 SHLIB_FLAGS=-shared -Wl,-soname,$(SHLIB_FILE)
28 SHLIB_FILE=libuci.$(SHLIB_EXT).$(VERSION)
30 all: uci-static uci libuci.$(SHLIB_EXT)
34 uci: cli.o libuci.$(SHLIB_EXT)
35 $(CC) -o $@ $< -L. -luci
37 uci-static: cli.o libuci.a
38 $(CC) $(CFLAGS) -o $@ $^
40 libuci-static.o: libuci.c file.c uci.h list.c err.h util.c
41 $(CC) $(CFLAGS) -c -o $@ $<
43 libuci-shared.o: libuci.c file.c uci.h list.c err.h util.c
44 $(CC) $(CFLAGS) $(FPIC) -c -o $@ $<
46 libuci.a: libuci-static.o
51 libuci.$(SHLIB_EXT): libuci-shared.o
52 $(LINK) $(SHLIB_FLAGS) -o $(SHLIB_FILE) $^ $(LIBS)
53 ln -sf $(SHLIB_FILE) $@
56 rm -f uci uci-static *.[oa] *.so* *.dylib*