Code: Select all
CXXFLAGS=" -DGTK_NO_CHECK_CASTS -DG_DISABLE_CAST_CHECKS -mno-accumulate-outgoing-args -pipe -combine -Os -fno-rtti -fno-exceptions -momit-leaf-frame-pointer -fomit-frame-pointer -fmerge-all-constants -ffunction-sections -fdata-sections -march=i486 -mtune=i686 " CFLAGS=" -mno-accumulate-outgoing-args -DGTK_NO_CHECK_CASTS -DG_DISABLE_CAST_CHECKS -pipe -combine -Os -momit-leaf-frame-pointer -fomit-frame-pointer -ffunction-sections -fdata-sections -fmerge-all-constants -march=i486 -mtune=i686 " LDFLAGS=" -Wl,-O4,-Os,-relax,--sort-common,--gc-sections,--as-needed,-s " ./configure --disable-rpath --prefix=/usr --sysconfdir=/etc --localstatedir=/var
Code: Select all
g++ -DGTK_NO_CHECK_CASTS -DG_DISABLE_CAST_CHECKS -pipe -combine -Os -fno-rtti -fno-exceptions -momit-leaf-frame-pointer -fomit-frame-pointer -fmerge-all-constants -ffunction-sections -fdata-sections -march=i486 -mtune=i686 -Wl,-O4,-Os,-relax,--sort-common,--gc-sections,--as-needed,-s -o retrovol alsa_classes.o config_settings.o config_window.o eggtrayicon.o main.o retro_slider.o -lasound -lgtk-x11-2.0
a more "proper" fix would be:--- retrovol_LDADD = -lasound -lX11 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
+++ retrovol_LDADD = -lasound -lgtk-x11-2.0
retrovol_LDADD = -lasound `pkg-config --libs gtk+-2.0`
(and leave it up to distros to rectify the pkg-config files appropriately so that future updates don't break due to unnecessary direct dependencies)
and now the size is under 50kb and more portable
here are the direct dependencies now:
- # objdump -x retrovol-0.12T-i486/usr/bin/retrovol |grep NEEDED
NEEDED libasound.so.2
NEEDED libgtk-x11-2.0.so.0
NEEDED libstdc++.so.6
NEEDED libm.so.6
NEEDED libc.so.6
NEEDED libgdk-x11-2.0.so.0
NEEDED libcairo.so.2
NEEDED libX11.so.6
NEEDED libgobject-2.0.so.0
NEEDED libglib-2.0.so.0
- # objdump -x retrovol-0.12/usr/bin/retrovol |grep NEEDED
NEEDED libasound.so.2
NEEDED libX11.so.6
NEEDED libgtk-x11-2.0.so.0
NEEDED libgdk-x11-2.0.so.0
NEEDED libatk-1.0.so.0
NEEDED libgdk_pixbuf-2.0.so.0
NEEDED libpangocairo-1.0.so.0
NEEDED libpango-1.0.so.0
NEEDED libcairo.so.2
NEEDED libgobject-2.0.so.0
NEEDED libgmodule-2.0.so.0
NEEDED libdl.so.2
NEEDED libglib-2.0.so.0
NEEDED libstdc++.so.6
NEEDED libm.so.6
NEEDED libgcc_s.so.1
NEEDED libc.so.6