X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=Makefile;h=ecfa8bc9723c43708f7e09c2195ed1b342cd6301;hp=ec382edf0c78b820032dcb54871c8ab19202d91c;hb=787fb6d4106cfd22485bd89d190be26e2a2c6178;hpb=99981540182c29049e971a3cb9a772d7f107b2ab diff --git a/Makefile b/Makefile index ec382ed..ecfa8bc 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ -COPTS=-g -O2 -CFLAGS=$(COPTS) -Wall -pedantic -std=gnu99 -Wno-unused -Werror +COPTS=-O2 +CFLAGS=$(COPTS) -fPIC -Wall -pedantic -std=gnu99 -Wno-unused -Werror +ifneq ($(DEBUG),) + CFLAGS += -g3 -DDEBUG_ALL +endif AR=ar CC=gcc @@ -11,7 +14,7 @@ cli.o: cli.c uci.h uci: cli.o libuci.a $(CC) $(CFLAGS) -o $@ $^ -libuci.o: libuci.c parse.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 $@ $^