X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=Makefile;h=ec382edf0c78b820032dcb54871c8ab19202d91c;hp=b33f6fad7b93c74871572cc83d9f4e31c9370921;hb=143aee566ef51011e45f66e2a18c8361270ac31f;hpb=f57d582f15c0ead3b600cb999ca298390957f597 diff --git a/Makefile b/Makefile index b33f6fa..ec382ed 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,21 @@ +COPTS=-g -O2 +CFLAGS=$(COPTS) -Wall -pedantic -std=gnu99 -Wno-unused -Werror + +AR=ar CC=gcc -CFLAGS=-O2 -Wall -pedantic -std=gnu99 -Wno-unused -Werror +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 uci.h list.c err.h -test.o: test.c uci.h +libuci.a: libuci.o + rm -f $@ + $(AR) rc $@ $^ + $(RANLIB) $@ clean: - rm -f parsetest *.o + rm -f uci *.[oa]