ca636065a37c6e4c58c012c645855f6fc0bb3d3b
[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         aoview_file.c
22
23 INC = \
24         aoview.h
25
26 OBJ = \
27         $(SRC:.c=.o)
28
29 PROG = aoview
30
31 $(PROG): $(OBJ)
32         $(CC) $(CFLAGS) -o $@ $(OBJ) $(LIBS)
33
34 $(OBJ): $(INC)
35
36 aoview_main.o: aoview_glade.h
37
38 clean:
39         rm -f $(OBJ) $(PROG)
40
41 install: $(BIN)/aoview
42
43 $(BIN)/aoview: aoview
44         install aoview $(BIN)
45
46 aoview_glade.h: aoview.glade
47         sed -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/"/' $< > $@