X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=Makefile;h=534a45e2031c7b2ba13964502bba67e987cb14dc;hb=0424ae4525050c3a09b13a240daf7e297b17767d;hp=514449564361c6f8553abc68ac398e53d6ab18fb;hpb=ddc7204d90897129d152d4212ee60acc939258da;p=tilda-gobject.git diff --git a/Makefile b/Makefile index 5144495..534a45e 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,10 @@ GCC=gcc -CFLAGS=-ggdb -O1 -pipe -DDEBUG=1 + +# 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` @@ -10,28 +15,42 @@ ALL_LIBS=`pkg-config --libs gtk+-2.0 vte dbus-glib-1` all: tilda -tilda: tilda.o tilda-window.o tilda-terminal.o - $(GCC) $(CFLAGS) $^ -o $@ $(ALL_LIBS) +tilda: tilda.o tilda-controller.o tilda-window.o tilda-terminal.o tomboykeybinder.o eggaccelerators.o + $(GCC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(ALL_LIBS) + +tilda.o: tilda.c tilda.h + $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS) -tilda.o: tilda.c +tilda-controller.o: tilda-controller.c tilda-controller.h tilda-controller.xml + dbus-binding-tool --mode=glib-server --prefix=tilda_controller tilda-controller.xml > tilda-controller-dbus-glue.h $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS) -tilda-window.o: tilda-window.c tilda-window.h +tilda-window.o: tilda-window.c tilda-window.h tilda-window.xml 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 +tilda-terminal.o: tilda-terminal.c tilda-terminal.h tilda-terminal.xml 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) + +eggaccelerators.o: eggaccelerators.c eggaccelerators.h + $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS) + memcheck: tilda - valgrind --tool=memcheck ./tilda + # Variables to make GLib work MUCH better in valgrind + export G_DEBUG=gc-friendly + export G_SLICE=always-malloc + valgrind --suppressions=tilda.suppressions --tool=memcheck --leak-check=full ./tilda clean: rm -f *.o rm -f tilda-window rm -f tilda-terminal rm -f tilda + rm -f tilda-controller-dbus-glue.h rm -f tilda-window-dbus-glue.h rm -f tilda-terminal-dbus-glue.h