4 WOPTS=-pedantic -Wno-unused -Werror
6 CFLAGS=$(COPTS) $(WOPTS) -Wall -std=gnu99
16 CFLAGS += -g3 -DDEBUG_ALL
25 SHLIB_FLAGS=-shared -Wl,-soname,$(SHLIB_FILE)
27 SHLIB_FILE=libuci.$(SHLIB_EXT).$(VERSION)
29 all: uci-static uci libuci.$(SHLIB_EXT)
33 uci: cli.o libuci.$(SHLIB_EXT)
34 $(CC) -o $@ $< -L. -luci
36 uci-static: cli.o libuci.a
37 $(CC) $(CFLAGS) -o $@ $^
39 libuci-static.o: libuci.c file.c uci.h list.c err.h util.c
40 $(CC) $(CFLAGS) -c -o $@ $<
42 libuci-shared.o: libuci.c file.c uci.h list.c err.h util.c
43 $(CC) $(CFLAGS) $(FPIC) -c -o $@ $<
45 libuci.a: libuci-static.o
50 libuci.$(SHLIB_EXT): libuci-shared.o
51 $(LD) $(SHLIB_FLAGS) -o $(SHLIB_FILE) $^ $(LIBS)
52 ln -sf $(SHLIB_FILE) $@
55 rm -f uci uci-static *.[oa] *.so* *.dylib*