summaryrefslogtreecommitdiff
path: root/com32/modules/Makefile
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-07-12 20:35:14 +0100
committerMatt Fleming <matt.fleming@intel.com>2012-07-20 17:55:14 +0100
commit5c88d800a5d612ceb2339476c544f09410b5a454 (patch)
treeac4dad47ce8969191506428fd6736cfb94fc5296 /com32/modules/Makefile
parentf0bbf9dd40f37f8c4870a33784996efd56955a75 (diff)
downloadsyslinux-5c88d800a5d612ceb2339476c544f09410b5a454.tar.gz
com32: Use --as-needed for LDFLAGS
This extends commit 4678fd92a21e ("elflink: fix dependency problem in cmenu/Makefile") and basically reverts commit fb543aa635ff ("com32: Per-object file LDFLAGS"). By using the --as-needed ld argument we can specify all the required shared libraries for a directory, even if not all of the libraries are needed by every .c32 file. --as-needed takes care of only creating DT_NEEDED entries for the shared libraries that are actually required to resolve undefined symbols in a given module. Furthermore, by using $(LIBS) we create a dependency between .c32 files and their shared libraries, which allows multiple make jobs to run in parallel. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/modules/Makefile')
-rw-r--r--com32/modules/Makefile18
1 files changed, 3 insertions, 15 deletions
diff --git a/com32/modules/Makefile b/com32/modules/Makefile
index 8d94cfec..8f5b7692 100644
--- a/com32/modules/Makefile
+++ b/com32/modules/Makefile
@@ -15,6 +15,9 @@
## COM32 standard modules
##
+LIBS = $(com32)/gpllib/libcom32gpl.c32 $(com32)/lib/libcom32.c32 \
+ $(com32)/libutil/libutil_com.c32
+
topdir = ../..
MAKEDIR = $(topdir)/mk
include $(MAKEDIR)/elf.mk
@@ -28,21 +31,6 @@ MODULES = config.c32 ethersel.c32 dmitest.c32 cpuidtest.c32 \
TESTFILES =
-LDFLAGS_cpuidtest.o = $(com32)/gpllib/libcom32gpl.c32
-LDFLAGS_disk.o = $(com32)/gpllib/libcom32gpl.c32
-LDFLAGS_ethersel.o = $(com32)/lib/libcom32.c32
-LDFLAGS_gpxecmd.o = $(com32)/lib/libcom32.c32
-LDFLAGS_host.o = $(com32)/lib/libcom32.c32
-LDFLAGS_ifcpu.o = $(com32)/libutil/libutil_com.c32 \
- $(com32)/gpllib/libcom32gpl.c32
-LDFLAGS_kbdmap.o = $(com32)/lib/libcom32.c32
-LDFLAGS_linux.o = $(com32)/lib/libcom32.c32
-LDFLAGS_pxechn.o = $(com32)/lib/libcom32.c32 \
- $(com32)/libutil/libutil_com.c32
-LDFLAGS_sanboot.o = $(com32)/lib/libcom32.c32
-LDFLAGS_vpdtest.o = $(com32)/gpllib/libcom32gpl.c32
-LDFLAGS_zzjson.o = $(com32)/gpllib/libcom32gpl.c32
-
all: $(MODULES) $(TESTFILES)
.PRECIOUS: %.o