X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=Makefile;h=bcd5676285989f0834520f5a1ea504e655cc38ca;hp=a738f539b9ab7cbeade88e5a5294e4e8a993c66a;hb=72d64f1bf4ee47788fee5b3eb4149c9fb34859d3;hpb=cc9710af5381d20ffa200978816a0fec999bbb62 diff --git a/Makefile b/Makefile index a738f53..bcd5676 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,10 @@ -COPTS=-g -O2 -CFLAGS=$(COPTS) -fPIC -Wall -pedantic -std=gnu99 -Wno-unused -Werror $(if $(DEBUG),-DDEBUG_ALL) +COPTS=-O2 +WOPTS=-pedantic -Wno-unused -Werror +CFLAGS=$(COPTS) -fPIC -Wall -std=gnu99 +ifneq ($(DEBUG),) + COPTS = -O0 + CFLAGS += -g3 -DDEBUG_ALL +endif AR=ar CC=gcc @@ -11,7 +16,7 @@ cli.o: cli.c uci.h uci: cli.o libuci.a $(CC) $(CFLAGS) -o $@ $^ -libuci.o: libuci.c file.c uci.h list.c err.h +libuci.o: libuci.c file.c uci.h list.c err.h util.c libuci.a: libuci.o rm -f $@ $(AR) rc $@ $^