X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=Makefile;h=bcd5676285989f0834520f5a1ea504e655cc38ca;hb=333ef9e09be5ac9c191625cca4efcebdbfc22073;hp=3b69678ba692c115dcada1416d5217b7a020d282;hpb=d5b661a39ea9320c58f44cb4b32691deffc7cb30;p=project%2Fuci.git diff --git a/Makefile b/Makefile index 3b69678..bcd5676 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,26 @@ +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 -CFLAGS=-O2 -Wall -pedantic -std=gnu99 +RANLIB=ranlib + +all: uci -all: parsetest -parsetest: libuci.o test.o +cli.o: cli.c uci.h +uci: cli.o libuci.a $(CC) $(CFLAGS) -o $@ $^ -libuci.o: libuci.c parse.c libuci.h -test.o: test.c libuci.h +libuci.o: libuci.c file.c uci.h list.c err.h util.c +libuci.a: libuci.o + rm -f $@ + $(AR) rc $@ $^ + $(RANLIB) $@ clean: - rm -f parsetest *.o + rm -f uci *.[oa]