Make TildaWindow properly generate terminal numbers
[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 dbus-glib-1`
7 ALL_LIBS=`pkg-config --libs gtk+-2.0 vte dbus-glib-1`
8
9 .PHONY: all memcheck clean
10
11 all: tilda
12
13 tilda: tilda.o tilda-window.o tilda-terminal.o
14         $(GCC) $(CFLAGS) $^ -o $@ $(ALL_LIBS)
15
16 tilda.o: tilda.c
17         $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS)
18
19 tilda-window.o: tilda-window.c tilda-window.h
20         dbus-binding-tool --mode=glib-server --prefix=tilda_window tilda-window.xml > tilda-window-dbus-glue.h
21         $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS)
22
23 tilda-terminal.o: tilda-terminal.c tilda-terminal.h
24         dbus-binding-tool --mode=glib-server --prefix=tilda_terminal tilda-terminal.xml > tilda-terminal-dbus-glue.h
25         $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS)
26
27 memcheck: tilda
28         valgrind --tool=memcheck ./tilda
29
30 clean:
31         rm -f *.o
32         rm -f tilda-window
33         rm -f tilda-terminal
34         rm -f tilda
35         rm -f tilda-window-dbus-glue.h
36         rm -f tilda-terminal-dbus-glue.h
37
38 boost-font:
39         @echo "Only run this when tilda is running, it attempts to send a message"
40         @echo "to the running tilda process to boost the font size"
41         dbus-send --print-reply \
42                   --dest=net.sourceforge.Tilda /net/sourceforge/Tilda/Window0/Terminal0 \
43                   org.freedesktop.DBus.Properties.Set \
44                   string:'' \
45                   string:font \
46                   variant:string:'Bitstream Vera Sans Mono 14'
47
48 shrink-font:
49         @echo "Only run this when tilda is running, it attempts to send a message"
50         @echo "to the running tilda process to shrink the font size"
51         dbus-send --print-reply \
52                   --dest=net.sourceforge.Tilda /net/sourceforge/Tilda/Window0/Terminal0 \
53                   org.freedesktop.DBus.Properties.Set \
54                   string:'' \
55                   string:font \
56                   variant:string:'Bitstream Vera Sans Mono 10'