X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=Makefile;h=01063a87e8954769e02816f8def0f426f86531a3;hp=bf194d141faa42773220901e0641c4d06cfc3d84;hb=8a3154a1db5078cf211c3ea76171956ba076dd76;hpb=5f28711b07ec0952720300d8561cfb47774a09db;ds=sidebyside diff --git a/Makefile b/Makefile index bf194d1..01063a8 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=-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 libuci.h list.c err.h -test.o: test.c libuci.h +libuci.o: libuci.c file.c uci.h list.c err.h +libuci.a: libuci.o + rm -f $@ + $(AR) rc $@ $^ + $(RANLIB) $@ clean: - rm -f parsetest *.o + rm -f uci *.[oa]