6dcb77994bbdfe17481f3747e74a892a347b10e8
[tilda-gobject.git] / Makefile
1 GCC=gcc
2 CFLAGS=-ggdb -O1 -pipe
3 GOBJ_CFLAGS=`pkg-config --cflags gobject-2.0`
4 GOBJ_LIBS=`pkg-config --libs gobject-2.0`
5
6 ALL_CFLAGS=`pkg-config --cflags gtk+-2.0 vte`
7 ALL_LIBS=`pkg-config --libs gtk+-2.0 vte`
8
9 .PHONY: all memcheck-tt memcheck-tw memcheck clean
10
11 all: tilda-window tilda-terminal
12
13 tilda-window: tilda-window.o
14         $(GCC) $(CFLAGS) $^ -o $@ $(GOBJ_LIBS)
15
16 tilda-window.o: tilda-window.c tilda-window.h
17         $(GCC) $(CFLAGS) -c -o $@ $< $(GOBJ_CFLAGS)
18
19 tilda-terminal: tilda-terminal.o
20         $(GCC) $(CFLAGS) $^ -o $@ $(ALL_LIBS)
21
22 tilda-terminal.o: tilda-terminal.c tilda-terminal.h
23         $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS)
24
25 memcheck-tw: tilda-window
26         valgrind --tool=memcheck ./tilda-window
27
28 memcheck-tt: tilda-terminal
29         valgrind --tool=memcheck ./tilda-terminal
30
31 memcheck: memcheck-tt memcheck-tw
32
33 clean:
34         rm -f *.o
35         rm -f tilda-window
36         rm -f tilda-terminal
37