cli code cleanup
[project/uci.git] / Makefile
1 COPTS=-O2
2 CFLAGS=$(COPTS) -fPIC -Wall -pedantic -std=gnu99 -Wno-unused -Werror
3 ifneq ($(DEBUG),)
4   COPTS = -O0
5   CFLAGS += -g3 -DDEBUG_ALL
6 endif
7
8 AR=ar
9 CC=gcc
10 RANLIB=ranlib
11
12 all: uci
13
14 cli.o: cli.c uci.h
15 uci: cli.o libuci.a
16         $(CC) $(CFLAGS) -o $@ $^
17
18 libuci.o: libuci.c file.c uci.h list.c err.h util.c
19 libuci.a: libuci.o
20         rm -f $@
21         $(AR) rc $@ $^
22         $(RANLIB) $@
23
24 clean:
25         rm -f uci *.[oa]