4 WOPTS=-pedantic -Wno-unused -Werror
6 CFLAGS=$(COPTS) -Wall -std=gnu99
16 CFLAGS += -g3 -DDEBUG_ALL
24 SHLIB_FLAGS=-shared -Wl,soname,$(SHLIB_FILE)
26 SHLIB_FILE=libuci.$(SHLIB_EXT).$(VERSION)
28 all: uci-static uci libuci.$(SHLIB_EXT)
32 uci: cli.o libuci.$(SHLIB_EXT)
33 $(CC) -o $@ $< -L. -luci
35 uci-static: cli.o libuci.a
36 $(CC) $(CFLAGS) -o $@ $^
38 libuci-static.o: libuci.c file.c uci.h list.c err.h util.c
39 $(CC) $(CFLAGS) -c -o $@ $<
41 libuci-shared.o: libuci.c file.c uci.h list.c err.h util.c
42 $(CC) $(CFLAGS) $(FPIC) -c -o $@ $<
44 libuci.a: libuci-static.o
49 libuci.$(SHLIB_EXT): libuci-shared.o
50 $(LD) $(SHLIB_FLAGS) -o $(SHLIB_FILE) $^ $(LIBS)
51 ln -sf $(SHLIB_FILE) $@
54 rm -f uci uci-static *.[oa] *.so* *.dylib*