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