From: Max Kellermann Date: Fri, 7 Nov 2008 12:42:31 +0000 (+0100) Subject: Makefile.am: added custom rule with -fwhole-program X-Git-Tag: v0.12_alpha1~26 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b2617354f437ac905057f521b47b8be6c3addcd1;p=ncmpc.git Makefile.am: added custom rule with -fwhole-program To make the ncmpc binary even smaller, you can compile all sources at once with "--combine -fwhole-program". Unfortunately, automake does not support this mode. For further experiments, this patch adds a custom rule which creates the binary named "ncmpc-tiny" this way. --- diff --git a/Makefile.am b/Makefile.am index 5b8469f..b0b2f4f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,6 +16,10 @@ doc_DATA = \ EXTRA_DIST = \ $(doc_DATA) +# build the smalles possible ncmpc binary +ncmpc-tiny: + $(MAKE) -C src $@ + sparse-check: $(MAKE) -C src $@ diff --git a/src/Makefile.am b/src/Makefile.am index 4664630..bd0168f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,3 +1,5 @@ +CLEANFILES = ncmpc-tiny + AM_CPPFLAGS = \ $(GLIB_CFLAGS)\ $(GTHREAD_CFLAGS)\ @@ -101,6 +103,10 @@ endif ncmpc_SOURCES+=${ncmpc_headers} +# build the smalles possible ncmpc binary +ncmpc-tiny: $(filter-out %.h,$(ncmpc_SOURCES)) + $(COMPILE) --combine -fwhole-program $(ncmpc_LDFLAGS) $(ncmpc_LDADD) $(LIBS) $^ -o $@ + strip --strip-all $@ # # sparse