From: Ira W. Snyder Date: Fri, 18 Jan 2008 02:01:37 +0000 (-0800) Subject: Add ability to build in "see what symbols aren't used" mode X-Git-Url: https://www.irasnyder.com/gitweb/?p=tilda-gobject.git;a=commitdiff_plain;h=0495bb6a17cfd70ae36946e61ff3de0e87d6e9a7 Add ability to build in "see what symbols aren't used" mode This is a very performance-degrading option, if turned on. Luckily, it's only at build time. Since this project isn't autoconfed yet, we'll just uncomment the proper options by hand. --- diff --git a/Makefile b/Makefile index c743125..e3c574a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,10 @@ GCC=gcc + +# Normal CFLAGS CFLAGS=-ggdb -O1 -pipe -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` @@ -11,7 +16,7 @@ ALL_LIBS=`pkg-config --libs gtk+-2.0 vte dbus-glib-1` all: tilda tilda: tilda.o tilda-window.o tilda-terminal.o tomboykeybinder.o tomboyutil.o eggaccelerators.o - $(GCC) $(CFLAGS) $^ -o $@ $(ALL_LIBS) + $(GCC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(ALL_LIBS) tilda.o: tilda.c $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS)