diff options
author | Kang-Che Sung (宋岡哲) <Explorer09@gmail.com> | 2018-03-16 22:31:48 +0800 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-04-06 11:13:30 -0300 |
commit | f48f5a10ca939393abe889082300474ac51e1126 (patch) | |
tree | 5ca5036d1c0419dda85ccd551303a983fa338cbe /Makefile.am | |
parent | 1aa23925c9c4604072d0fb1e2d3932caf0ad9c53 (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 9abfdd8f..f095d6d7 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 \ linux/PerfCounter.c @@ -56,7 +56,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 @@ -73,7 +73,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 |