X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=Makefile;h=1e0fce371d132da92cec2d35ef4d34bf2327c1a8;hp=645ec65a53a725726bd9b19763d0dfee1d808671;hb=508525c69e08a96031ed24f2d09e3bc2d1d33fca;hpb=25424d34314f5da11305104c78cc82beff801e16;ds=sidebyside diff --git a/Makefile b/Makefile index 645ec65..1e0fce3 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,21 @@ +COPTS=-g -O2 +CFLAGS=$(COPTS) -fPIC -Wall -pedantic -std=gnu99 -Wno-unused -Werror + +AR=ar CC=gcc -CFLAGS=-g -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]