[Window] Add more hardcoded settings for testing
[tilda-gobject.git] / Makefile
1 GCC=gcc
2
3 # Normal CFLAGS
4 CFLAGS=-ggdb -O1 -pipe -DDEBUG=1
5 LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed
6 #CFLAGS=-ggdb -O1 -pipe -DDEBUG=1 -ffunction-sections -fdata-sections
7 #LDFLAGS=-Wl,--gc-sections -Wl,--print-gc-sections
8 GOBJ_CFLAGS=`pkg-config --cflags gobject-2.0`
9 GOBJ_LIBS=`pkg-config --libs gobject-2.0`
10
11 ALL_CFLAGS=`pkg-config --cflags gtk+-2.0 vte dbus-glib-1`
12 ALL_LIBS=`pkg-config --libs gtk+-2.0 vte dbus-glib-1`
13
14 .PHONY: all memcheck clean
15
16 all: tilda
17
18 tilda: tilda.o tilda-window.o tilda-terminal.o tomboykeybinder.o tomboyutil.o eggaccelerators.o
19         $(GCC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(ALL_LIBS)
20
21 tilda.o: tilda.c
22         $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS)
23
24 tilda-window.o: tilda-window.c tilda-window.h
25         dbus-binding-tool --mode=glib-server --prefix=tilda_window tilda-window.xml > tilda-window-dbus-glue.h
26         $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS)
27
28 tilda-terminal.o: tilda-terminal.c tilda-terminal.h
29         dbus-binding-tool --mode=glib-server --prefix=tilda_terminal tilda-terminal.xml > tilda-terminal-dbus-glue.h
30         $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS)
31
32 tomboykeybinder.o: tomboykeybinder.c tomboykeybinder.h
33         $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS)
34
35 tomboyutil.o: tomboyutil.c tomboyutil.h
36         $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS)
37
38 eggaccelerators.o: eggaccelerators.c eggaccelerators.h
39         $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS)
40
41 memcheck: tilda
42         valgrind --tool=memcheck ./tilda
43
44 clean:
45         rm -f *.o
46         rm -f tilda-window
47         rm -f tilda-terminal
48         rm -f tilda
49         rm -f tilda-window-dbus-glue.h
50         rm -f tilda-terminal-dbus-glue.h
51
52 boost-font:
53         @echo "Only run this when tilda is running, it attempts to send a message"
54         @echo "to the running tilda process to boost the font size"
55         dbus-send --print-reply \
56                   --dest=net.sourceforge.Tilda /net/sourceforge/Tilda/Window0/Terminal0 \
57                   org.freedesktop.DBus.Properties.Set \
58                   string:'' \
59                   string:font \
60                   variant:string:'Bitstream Vera Sans Mono 14'
61
62 shrink-font:
63         @echo "Only run this when tilda is running, it attempts to send a message"
64         @echo "to the running tilda process to shrink the font size"
65         dbus-send --print-reply \
66                   --dest=net.sourceforge.Tilda /net/sourceforge/Tilda/Window0/Terminal0 \
67                   org.freedesktop.DBus.Properties.Set \
68                   string:'' \
69                   string:font \
70                   variant:string:'Bitstream Vera Sans Mono 10'