a2878b0e6d93d8a436e220c3a0468001d60340eb
[fw/altos] / aoview / Makefile
1 VERSION=$(shell git describe)
2 MODULES=gtk+-2.0 libglade-2.0 gconf-2.0
3 INCLUDES=$(shell pkg-config --cflags $(MODULES)) -I..
4 WARN= -Wall -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing
5 CFLAGS=$(INCLUDES) -O0 -g $(WARN) -DAOVIEW_VERSION='"$(VERSION)"'
6 LIBS=$(shell pkg-config --libs $(MODULES)) -lm
7
8 BIN=/usr/local/bin
9
10 SRC = \
11         aoview_main.c \
12         aoview_dev.c \
13         aoview_dev_dialog.c \
14         aoview_serial.c \
15         aoview_monitor.c \
16         aoview_state.c \
17         aoview_convert.c \
18         aoview_log.c \
19         aoview_table.c \
20         aoview_util.c
21
22 INC = \
23         aoview.h
24
25 OBJ = \
26         $(SRC:.c=.o)
27
28 PROG = aoview
29
30 $(PROG): $(OBJ)
31         $(CC) $(CFLAGS) -o $@ $(OBJ) $(LIBS)
32
33 $(OBJ): $(INC)
34
35 aoview_main.o: aoview_glade.h
36
37 clean:
38         rm -f $(OBJ) $(PROG)
39
40 install: $(BIN)/aoview
41
42 $(BIN)/aoview: aoview
43         install aoview $(BIN)
44
45 aoview_glade.h: aoview.glade
46         sed -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/"/' $< > $@