X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=Makefile;h=f7814740b167bc0b662137ba66bd37ab0abb2f62;hb=93db48f0c2f7a1185d4da9d9ab7cde83b9a3aa94;hp=7ca9fced17fe9173f84c497fd4623dd64630040f;hpb=74bc0dd01b225f5b61bec6f93087ac24e23471cf;p=tilda-gobject.git diff --git a/Makefile b/Makefile index 7ca9fce..f781474 100644 --- a/Makefile +++ b/Makefile @@ -1,34 +1,70 @@ GCC=gcc -CFLAGS=-ggdb -O1 -pipe + +# Normal CFLAGS +CFLAGS=-ggdb -O1 -pipe -Wall -DDEBUG=1 +LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed +#CFLAGS=-ggdb -O1 -pipe -DDEBUG=1 -ffunction-sections -fdata-sections +#LDFLAGS=-Wl,--gc-sections -Wl,--print-gc-sections GOBJ_CFLAGS=`pkg-config --cflags gobject-2.0` GOBJ_LIBS=`pkg-config --libs gobject-2.0` -.PHONY: all memcheck-tt memcheck-tw memcheck clean +ALL_CFLAGS=`pkg-config --cflags gtk+-2.0 vte dbus-glib-1` +ALL_LIBS=`pkg-config --libs gtk+-2.0 vte dbus-glib-1` -all: tilda-window tilda-terminal +.PHONY: all memcheck clean -tilda-window: tilda-window.o - $(GCC) $(CFLAGS) $^ -o $@ $(GOBJ_LIBS) +all: tilda -tilda-window.o: tilda-window.c tilda-window.h - $(GCC) $(CFLAGS) -c -o $@ $< $(GOBJ_CFLAGS) +tilda: tilda.o tilda-window.o tilda-terminal.o tomboykeybinder.o tomboyutil.o eggaccelerators.o + $(GCC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(ALL_LIBS) + +tilda.o: tilda.c + $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS) -tilda-terminal: tilda-terminal.o - $(GCC) $(CFLAGS) $^ -o $@ $(GOBJ_LIBS) +tilda-window.o: tilda-window.c tilda-window.h + dbus-binding-tool --mode=glib-server --prefix=tilda_window tilda-window.xml > tilda-window-dbus-glue.h + $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS) tilda-terminal.o: tilda-terminal.c tilda-terminal.h - $(GCC) $(CFLAGS) -c -o $@ $< $(GOBJ_CFLAGS) + dbus-binding-tool --mode=glib-server --prefix=tilda_terminal tilda-terminal.xml > tilda-terminal-dbus-glue.h + $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS) + +tomboykeybinder.o: tomboykeybinder.c tomboykeybinder.h + $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS) -memcheck-tw: tilda-window - valgrind --tool=memcheck ./tilda-window +tomboyutil.o: tomboyutil.c tomboyutil.h + $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS) -memcheck-tt: tilda-terminal - valgrind --tool=memcheck ./tilda-terminal +eggaccelerators.o: eggaccelerators.c eggaccelerators.h + $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS) -memcheck: memcheck-tt memcheck-tw +memcheck: tilda + valgrind --tool=memcheck ./tilda clean: rm -f *.o rm -f tilda-window rm -f tilda-terminal + rm -f tilda + rm -f tilda-window-dbus-glue.h + rm -f tilda-terminal-dbus-glue.h + +boost-font: + @echo "Only run this when tilda is running, it attempts to send a message" + @echo "to the running tilda process to boost the font size" + dbus-send --print-reply \ + --dest=net.sourceforge.Tilda /net/sourceforge/Tilda/Window0/Terminal0 \ + org.freedesktop.DBus.Properties.Set \ + string:'' \ + string:font \ + variant:string:'Bitstream Vera Sans Mono 14' +shrink-font: + @echo "Only run this when tilda is running, it attempts to send a message" + @echo "to the running tilda process to shrink the font size" + dbus-send --print-reply \ + --dest=net.sourceforge.Tilda /net/sourceforge/Tilda/Window0/Terminal0 \ + org.freedesktop.DBus.Properties.Set \ + string:'' \ + string:font \ + variant:string:'Bitstream Vera Sans Mono 10'