diff options
author | Kang-Che Sung (宋岡哲) <Explorer09@gmail.com> | 2018-03-16 22:31:48 +0800 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-03-16 11:31:48 -0300 |
commit | 2e3c35d66d7fbc91bf754b345c8ea3d4f2f36f7d (patch) | |
tree | e6a8b23828728f6e6744b24dc32d7ae83557b734 /Makefile.am | |
parent | 697f5bb9c14a89b2e04519c956fc7e455c9b1cc0 (diff) |
Use AM_CFLAGS and AM_LDFLAGS in Makefile.am (#760)
This reduces generated Makefile.in size by 74%.
(217319 bytes -> 56326 bytes)
Automake considers that <prog>_CFLAGS and <prog>_LDFLAGS are
program-specific build rules, and when such are specified, Automake
will generate additional code just to avoid the "generic" and
package-wide AM_CFLAGS or AM_LDFLAGS. (Especially for <prog>_CFLAGS,
Automake will rename generated object files to become "prog-foo.o" and
such, and it's _a lot_ of code to achieve this in Makefile.)
There's no reason for htop to rename intermediate object files. It's
better to make things simpler.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am index a3a5b6b7..4371d497 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,8 +12,8 @@ applications_DATA = htop.desktop pixmapdir = $(datadir)/pixmaps pixmap_DATA = htop.png -htop_CFLAGS = -pedantic -Wall $(wextra_flag) -std=c99 -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"$(sysconfdir)\" -I"$(top_srcdir)/$(my_htop_platform)" -htop_LDFLAGS = +AM_CFLAGS = -pedantic -Wall $(wextra_flag) -std=c99 -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"$(sysconfdir)\" -I"$(top_srcdir)/$(my_htop_platform)" +AM_LDFLAGS = AM_CPPFLAGS = -DNDEBUG myhtopsources = AvailableMetersPanel.c CategoriesPanel.c CheckItem.c \ @@ -37,7 +37,7 @@ AffinityPanel.h HostnameMeter.h OpenFilesScreen.h Affinity.h IncSet.h Action.h \ EnvScreen.h InfoScreen.h XAlloc.h if HTOP_LINUX -htop_CFLAGS += -rdynamic +AM_CFLAGS += -rdynamic myhtopplatsources = linux/Platform.c linux/IOPriorityPanel.c linux/IOPriority.c \ linux/LinuxProcess.c linux/LinuxProcessList.c linux/LinuxCRT.c linux/Battery.c @@ -54,7 +54,7 @@ freebsd/FreeBSDProcess.h freebsd/FreeBSDCRT.h freebsd/Battery.h endif if HTOP_DRAGONFLYBSD -htop_LDFLAGS += -lkvm -lkinfo -lexecinfo +AM_LDFLAGS += -lkvm -lkinfo -lexecinfo myhtopplatsources = dragonflybsd/Platform.c dragonflybsd/DragonFlyBSDProcessList.c \ dragonflybsd/DragonFlyBSDProcess.c dragonflybsd/DragonFlyBSDCRT.c dragonflybsd/Battery.c @@ -71,7 +71,7 @@ openbsd/OpenBSDProcess.h openbsd/OpenBSDCRT.h openbsd/Battery.h endif if HTOP_DARWIN -htop_LDFLAGS += -framework IOKit -framework CoreFoundation +AM_LDFLAGS += -framework IOKit -framework CoreFoundation myhtopplatsources = darwin/Platform.c darwin/DarwinProcess.c \ darwin/DarwinProcessList.c darwin/DarwinCRT.c darwin/Battery.c |