Embed glade file in executable
[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 SRC = \
9         aoview_main.c \
10         aoview_dev.c \
11         aoview_dev_dialog.c \
12         aoview_serial.c \
13         aoview_monitor.c \
14         aoview_state.c \
15         aoview_convert.c \
16         aoview_log.c \
17         aoview_table.c \
18         aoview_util.c
19
20 INC = \
21         aoview.h
22
23 OBJ = \
24         $(SRC:.c=.o)
25
26 PROG = aoview
27
28 $(PROG): $(OBJ)
29         $(CC) $(CFLAGS) -o $@ $(OBJ) $(LIBS)
30
31 $(OBJ): $(INC)
32
33 aoview_main.o: aoview_glade.h
34
35 clean:
36         rm -f $(OBJ) $(PROG)
37
38 aoview_glade.h: aoview.glade
39         sed -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/"/' $< > $@