summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9f05576)
raw | patch | inline | side by side (parent: 9f05576)
author | Max Kellermann <max@duempel.org> | |
Fri, 7 Nov 2008 12:42:31 +0000 (13:42 +0100) | ||
committer | Max Kellermann <max@duempel.org> | |
Fri, 7 Nov 2008 12:42:31 +0000 (13:42 +0100) |
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.
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.
Makefile.am | patch | blob | history | |
src/Makefile.am | patch | blob | history |
diff --git a/Makefile.am b/Makefile.am
index 5b8469f3b7bf9f996fb1ad10955bacbde37c9a8b..b0b2f4fc0009cbc7be96d2458b79d29eac5d0d88 100644 (file)
--- a/Makefile.am
+++ b/Makefile.am
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 4664630e5f5977aa592140d2886600a35194547d..bd0168f5a5fcda903f58973f47df0ecbb6ccd3a6 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
+CLEANFILES = ncmpc-tiny
+
AM_CPPFLAGS = \
$(GLIB_CFLAGS)\
$(GTHREAD_CFLAGS)\
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