X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=Makefile;h=c136915a734565b736d66bacbd41245e3feff79c;hp=a738f539b9ab7cbeade88e5a5294e4e8a993c66a;hb=a8c552f656dcc429f03de36f3067522d51bb0b68;hpb=cc9710af5381d20ffa200978816a0fec999bbb62 diff --git a/Makefile b/Makefile index a738f53..c136915 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,9 @@ -COPTS=-g -O2 -CFLAGS=$(COPTS) -fPIC -Wall -pedantic -std=gnu99 -Wno-unused -Werror $(if $(DEBUG),-DDEBUG_ALL) +COPTS=-O2 +CFLAGS=$(COPTS) -fPIC -Wall -pedantic -std=gnu99 -Wno-unused -Werror +ifneq ($(DEBUG),) + COPTS = -O0 + CFLAGS += -g3 -DDEBUG_ALL +endif AR=ar CC=gcc @@ -11,7 +15,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 $@ $^