summaryrefslogtreecommitdiff
path: root/mk
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'nocomapi'syslinux-6.03-pre7H. Peter Anvin2014-03-031-1/+1
|\
| * lib.mk: Add biosboot.oH. Peter Anvin2014-02-131-1/+1
| | | | | | | | | | | | We need biosboot.o for shuffle and boot now. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Makefiles: export the firmware type as a cpp variableH. Peter Anvin2014-02-275-8/+8
| | | | | | | | | | | | Export the firmware type as a cpp variable so we can #ifdef. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | mk/efi.mk: Add libefi.a dependencyGene Cumm2014-02-221-2/+2
| | | | | | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | efi: fix up gnu-efi buildGene Cumm2014-02-221-5/+6
| | | | | | | | | | | | | | | | | | | | This eliminates the forking and pushes the build under the efi32/ and efi64/ object directories eliminating a build race and preventing the build from breaking as gnu-efi takes a few seconds to complete. Depends on gnu-efi commit 52d88dd Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | efi: We need -m32/-m64 even when processing assemblyH. Peter Anvin2014-02-211-6/+4
| | | | | | | | | | | | We need to specify -m32/-m64 even when we are processing assembly. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | mk/efi.mk: Disable stack protectorMagnus Granberg2014-02-211-1/+2
|/ | | | | | | | Disable the stack protector if on by default. Copied from https://bugs.gentoo.org/show_bug.cgi?id=495146. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* mk/efi.mk: Cancel old rulesGene Cumm2014-01-311-0/+4
| | | | | | | If a dependency is added to the newer rules, make will choose the easier rules instead of the preferred rules. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi: Make the gnu-efi build scripts more portableMatt Fleming2014-01-081-2/+1
| | | | | | | | | | | | | Not all distributions point /bin/sh at /bin/bash, so remove some bashisms (pushd/popd) and require that build-gnu-efi.sh be run from the Syslinux object directory. Also, swap realpath(1) for readlink(1) because the former isn't available on Debian. Reported-by: Ferenc Wagner <wferi@niif.hu> Reported-by: Celelibi <celelibi@gmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: Check the gnu-efi build succeededMatt Fleming2013-12-111-1/+5
| | | | | | | Guard against future changes by requiring that the gnu-efi build scripts exit with success. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: Make gnu-efi build scripts more robustMatt Fleming2013-12-111-1/+1
| | | | | | | | | | | | | | | Modify the scripts to check that they're called with the correct number of arguments and error out otherwise after printing some helpful info. This change also stops relying on passing arguments through environment variables and instead passes them explicitly to the scripts, which is definitely more robust, and handles the case where the scripts are invoked directly. Of course, now that the scripts can be invoked directly we need to regard any input as hostile and exit immediately on error. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* efi: Add build scripts for gnu-efiMatt Fleming2013-12-101-15/+6
| | | | | | | | | | | Now that we have a gnu-efi git submodule we need some scripts to build and install it into architecture-specific build directories. This actually simplifies things a bit because we no longer need to account for the variations in distribution installation paths - we now control the paths. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* cmenu: Add libmenu.c32 to $(C_LIBS)syslinux-6.02-pre15Matt Fleming2013-07-291-1/+1
| | | | | | | | The menu modules, display, text, etc, require libmenu.c32 to be listed as a dependency. Append to $(C_LIBS) in mk/elf.mk so that module Makefiles can make use of the suffix rules. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* Merge branch 'elflink-undi-debug-for-mfleming' of ↵syslinux-6.02-pre13Matt Fleming2013-07-261-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://github.com/geneC/syslinux into firmware Pull UNDIIF packet header debug patch series from Gene Cumm, * 'elflink-undi-debug-for-mfleming' of git://github.com/geneC/syslinux: Allow for UNDIIF_ID_DEBUG in 1 mk line core/lwip/undiif: dprint MAC/ARP/IP/ICMP/TCP/UDP headers; poll debug lwip/undiif: split arphdr._hwlen_protolen lwip: Allow LWIP_PLATFORM_* output to use dprintf lwip: undiif: Fix debug options to unique *_DEBUG macros Conflicts: core/kaboom.c
| * Allow for UNDIIF_ID_DEBUG in 1 mk linesyslinux-5.11-pre9Gene Cumm2013-07-201-0/+4
| | | | | | | | | | | | | | Add comments and 1 line to mk/devel.mk to debug headers of all packets sent/recieved through undiif.c. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | Merge tag 'syslinux-5.11-pre8' into firmwaresyslinux-6.02-pre1Matt Fleming2013-07-083-1/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | syslinux-5.11-pre8 Conflicts: NEWS com32/lib/Makefile core/conio.c mk/devel.mk mk/elf.mk
| * mk: enable dynamic debug supportMatt Fleming2013-07-051-0/+1
| | | | | | | | | | | | | | This will probably be disabled for releases, but it's definitely worthwhile having enabled for all prereleases. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * mk: include $(GCCWARN) when building ELF objectsMatt Fleming2013-07-051-1/+1
| | | | | | | | | | | | | | It's currently impossible to turn on dprintf() statements in com32/modules because $(GCCWARN) isn't used as part of $(CFLAGS). Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | mk: stop complaining about unused parametersMatt Fleming2013-06-201-1/+2
| | | | | | | | | | | | | | | | Now that we've got the firmware abstraction, many backend functions don't use all of their parameters, and it isn't necessarily something we want to warn about all the time. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | efi: Turn on symbol export whitelistMatt Fleming2013-06-191-1/+2
| | | | | | | | | | | | | | Reduce the default visibility of objects in efi/ as was done for BIOS in commit e4b3ce2dd82c ("Symbol export whitelist"). Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | mk: reinstate -mregparm for BIOSMatt Fleming2013-06-194-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | There's still a bunch of assembly code that assumes we're building our C objects with -mregparm=3. For example, the code to transition from 16-bit real-mode mode to 32-bit protected mode assumes this. Violating this assumption leads to various hangs, caused by garbage function arguments. Put back -mregparm into CFLAGS that was removed in commit 8789d2689564 ("mk/embedded.mk: Don't use -mregparm in core"). Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | ldlinux: use platform filename extensionMatt Fleming2013-05-162-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users are starting to package all Syslinux versions on one boot medium and are running into problems because all versions of ldlinux have the same filename, ldlinux.c32. The version of ldlinux.c32 compiled for bios will not work with efi32 or efi64, and vice versa. What we need is a way for the Syslinux core to know exactly which filename to load. Use the following extensions for the corresponding platforms, .c32 - bios .e32 - efi32 .e64 - efi64 Now all ldlinux variants can be kept in the same directory without causing any conflicts. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | efi: Add network supportsyslinux-6.00-pre5Matt Fleming2013-04-232-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add TCP and UDP support to the EFI firmware backend. This necessitated moving all tcp functions to a core_tcp_* prefix so that they could be implemented differently for BIOS+lwip and EFI. Unfortunately, the tcp_* prefix is already in use by the lwip code. To maintain symmetry, the UDP functions were also moved from net_core_* to core_udp_*. The net_core API was introduced in 5.x to allow the legacy PXE and lwip stacks to live side by side, and the intention was that net_core_init() would take a protocol argument to build a protocol-specific object. It turned out to be easier to call either udp or tcp functions directly because the semantics of read/write differ between protocols. Booting an IPv4 EFI PXE stack using tftp and http has been tested. There are a couple of TODO items left, o dns resolve code is missing o ftp hasn't been tested Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | Merge tag 'syslinux-5.10-pre2' into for-hpa/elflink/firmwareMatt Fleming2013-03-223-9/+14
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | syslinux-5.10-pre2 Conflicts: NEWS com32/include/netinet/in.h com32/include/sys/cpu.h com32/lib/Makefile core/Makefile core/fs/diskio.c core/fs/pxe/pxe.h core/init.c core/mem/free.c core/mem/malloc.c mk/devel.mk version
| * Merge branch 'lwip' into elflinkMatt Fleming2013-02-261-4/+7
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Welcome to Syslinux 5.10. Conflicts: NEWS com32/lib/Makefile com32/lib/sys/open.c com32/lib/syslinux/ipappend.c com32/modules/Makefile com32/modules/prdhcp.c core/Makefile core/cmdline.inc core/com32.inc core/comboot.inc core/configinit.inc core/fs/chdir.c core/fs/fs.c core/fs/pxe/dnsresolv.c core/fs/pxe/pxe.c core/fs/pxe/pxe.h core/idle.c core/include/ctype.h core/init.inc core/mem/init.c core/parseconfig.inc core/runkernel.inc core/syslinux.ld core/ui.inc doc/comboot.txt version
| | * core: Add "dprint" facility to assemblyH. Peter Anvin2011-06-271-4/+7
| | | | | | | | | | | | | | | | | | | | | Add a "dprint" facility to the assembly files, which simply calls dprintf if debugging is enabled. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | mem: Add magic field to detect memory corruptionMatt Fleming2013-02-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Very little checking is performed on the validity of freelist metadata. Add a magic field to struct arena_header which can be used to detect memory corruption or whether a user tries to free something that isn't a malloc pointer. This feature can be enabled with -DDEBUG_MALLOC. Turn it on for development in mk/devel.mk. Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | Merge tag 'syslinux-5.01' into firmwaresyslinux-6.00-pre4Matt Fleming2013-01-292-4/+11
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile NEWS com32/cmenu/Makefile com32/elflink/ldlinux/Makefile com32/gfxboot/Makefile com32/gpllib/Makefile com32/include/sys/module.h com32/lib/Makefile com32/lib/sys/module/elf_module.c com32/menu/Makefile com32/rosh/Makefile com32/samples/Makefile core/init.c mk/elf.mk Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * | Rename libcom32gpl.c32 to libgpl.c32H. Peter Anvin2013-01-171-1/+1
| | | | | | | | | | | | | | | | | | Conform to 8.3 filenames for essential files. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * | Rename libutil_com.c32 to libutil.c32H. Peter Anvin2013-01-171-1/+1
| | | | | | | | | | | | | | | | | | Conform to 8.3 filenames for essential files. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * | Always strip all the modulesH. Peter Anvin2013-01-172-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | Always strip the modules; they are too big unstripped. Specifically, we generate unstripped *.elf files, and then convert them to stripped *.c32 files. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | | mk/embedded.mk: Don't use -mregparm in coreMatt Fleming2013-01-081-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately commit 4eb06d95d882 ("mk: Add -fPIC for x86_64 to embedded.mk") left -mregparm enabled when compiling objects in core/, which means that when compiling for i386 those objects are compiled with a different ABI compared with everything else, leading to hangs when booting under 32-bit EFI. We should only enable -mregparm for code that absolutely requires it, such as dos/crt0.S which would need to be re-written to use another ABI. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | Merge tag 'syslinux-5.00' into firmwaresyslinux-6.00-pre3Matt Fleming2012-12-071-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile com32/elflink/ldlinux/Makefile com32/lib/sys/module/elf_module.c core/cleanup.c core/comboot.inc core/conio.c core/fs/fs.c core/init.c core/mem/free.c core/mem/malloc.c core/timer.inc diag/geodsp/Makefile extlinux/main.c mk/embedded.mk modules/Makefile Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * | Symbol export whitelistMatt Fleming2012-12-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before modules were dynamically loaded the boundary between GPL and non-GPL code was implicit because of the separate link domains for each module. With dynamic modules we need an explicit whitelist of core symbols that non-GPL code can link against at runtime without needing to be re-licensed under the GPL. Mark such symbols with __export, so that it is explicitly clear which symbols in the core can be linked against by non-GPL code. Reduce the visibility of symbols in both the core and ldlinux.c32 with -fvisibility=hidden. __export changes the visibility to 'default'. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | efi: Add -mno-red-zone to CFLAGSsyslinux-6.00-pre2Matt Fleming2012-11-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The 'red zone' is a 128-byte area at the bottom of the stack frame and is defined as part of the SysV Application Binary Interface. However, UEFI firmware uses the Microsoft ABI, rather than the SysV ABI, and our red zone can become corrupt if we don't turn it off. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | efi: Add a simple script to find gnu-efi filesMatt Fleming2012-11-151-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | The location of the installed gnu-efi libraries and header files varies wildly with different distributions. We need a way to find the correct location for a given architecture. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | mk: Add -fPIC for x86_64 to embedded.mkMatt Fleming2012-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Building for x86_64 requires that the object files be compiled with -fPIC, so delete the comment in embedded.mk. With this change we can remove lib.mk and efi.mk from core/Makefile. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | firmware: Make disk->private an opaque typeMatt Fleming2012-11-151-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've currently got both the BIOS and EFI versions of struct disk_private in core/include/disk.h, which isn't ideal because this file shouldn't need to know about the inner-workings of the firmware's private disk info. Move the implementation of 'struct disk_private' into more suitable locations and use a void * for the 'private' member of struct disk. This change allows us to once and for all delete the gnu-efi header files from core/include/core.h and the gnu-efi include paths from mk/lib.mk. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | firmware: Move memory operations into firmwareMatt Fleming2012-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Instead of littering core/mem with #ifdef SYSLINUX_EFI move memory operations into the 'firmware' structure so that they can be implemented differently for BIOS and EFI. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | Merge tag 'syslinux-5.00-pre10' into for-hpa/elflink/firmwareMatt Fleming2012-11-142-1/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull in the latest prerelease that includes some bug fixes for ldlinux and a realloc() bug in core/. Conflicts: com32/cmenu/Makefile com32/elflink/ldlinux/Makefile com32/lib/Makefile core/pxelinux.asm
| * | mk: Add Makefile variable for pythonMatt Fleming2012-11-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of hard-coding the python executable name use a make variable like we do for all other executables used during the build. This has the added bonus of allowing $(PYTHON) to be overridden on the command line, e.g. make PYTHON=python2 which is particularly useful for distributions where /usr/bin/python is actually python3. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | Merge tag 'syslinux-5.00-pre9' into for-hpa/elflink/firmwareMatt Fleming2012-11-051-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | This merge also includes the Syslinux-4.06 release. Conflicts: Makefile com32/hdt/Makefile com32/modules/Makefile com32/samples/hello.c mtools/Makefile
| * | Clean up $(GPLLIB) leakMatt Fleming2012-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modules were linking against com32/gpllib/libcom32gpl.c32 even when NOGPL was set, so remove it from various modules Makefiles and use $(C_LIBS) in mk/elf.mk which already has the conditional-magic for $(GPLLIB). Also, the object files in com32/gpllib/ are not distributed in the release tarballs, which means that if a user does a 'make netinstall' they hit the following install error, install: cannot stat `com32/gpllib/*.c32': No such file or directory Add a $(INSTALLABLE_MODULES) variable to separate the list of build and install modules. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | Add per-firmware object directory supportMatt Fleming2012-10-163-17/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have multiple firmware backends it no longer makes sense to write object files to the same directory as their source. A better solution is to write the object files to a per-firmware directory under a top-level object directory. The top-level object directory can be specified on the command-line with the O= variable, e.g. make O=/tmp/obj. If no top-level object directory is specified an 'obj' directory is created in the top-level of the Syslinux source repository. All the existing make targets continue to work as before, however now they apply to all firmware backends, e.g. 'make installer' will build the BIOS, 32-bit EFI and 64-bit EFI installers and place them under $(OBJ)/bios, $(OBJ)/efi32 and $(OBJ)/efi64 respectively. Note unlike every other bit of Syslinux, the gpxe objects are still kept in the src directory, e.g. gpxe/src, since gpxe is only required by the BIOS backend. It is possible to specify a make target for a specific firmware or list of firmware with the following syntax, make [firmware[,firmware]] [target[,target]] To clean the object directory for just the BIOS firmware type, 'make bios clean' To build both the 32-bit and 64-bit EFI installers type, 'make efi32 efi64 installer' Since the Syslinux make infrastructure is now more complex a new file doc/building.txt has been created to explain how to build Syslinux. The top-level Makefile now exports some make variables for use in module Makefiles, - topdir - the top-level source directory of the Syslinux repository, e.g. /usr/src/syslinux - objdir - the top-level object directory for the firmware backend currently being built, e.g. /obj/syslinux/bios - SRC - the source directory in the Syslinux repository for the module currently being built, e.g. /usr/src/syslinux/com32/libupload - OBJ - the object directory for the module currently being built, e.g. /obj/syslinux/bios/com32/libupload Since we're rewriting the Makefile infrastructure anyway it seemed like a good idea to add parallel support. By writing subdirectories as prequisites for make targets the objects in those subdirectories can be built in parallel. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | Merge branch 'elflink' into for-hpa/elflink/firmwareMatt Fleming2012-09-051-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | We need to pick up a couple of bug fixes, one of which causes some machines to hang because we're walking out of the bounds of an ELF symbol table. Conflicts: com32/lib/Makefile core/init.c
* | | efi: Reworked EFI boot loader on several fronts.Chandramouli Narayanan2012-09-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a) Added EFI timer handling in support of menu subsystem. This enables the menu system to display and handle timeout properly. b) Taking the cue from http://git.kernel.org/?p=boot/efilinux/efilinux.git on the requirement that key kernel data structures need to be capped at 0x3FFFFFFF, reworked the efi boot loader accordingly. The patch for the boot loader is an adapted from the recent patches in efilinux as noted above. c) Arrow keys (up/down) in the menu system were not working earlier requiring the user to use CTRL sequence keys instead. Implemented fixes to map the EFI scan code to appropriate key sequences in order for get_key() to handle the menu traversal in a user-friendly fashion. d)efi/keymap.h has been added in support of key scan code mapping. Signed-off-by: Chandramouli Narayanan <chandramouli.narayanan@intel.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | core: Rename DEBUG macro to avoid gnu-efi library conflictChandramouli Narayanan2012-09-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use of DEBUG macro clases with gnu-efi library. This patch defines CORE_DEBUG. Appropriate changes to sources are made as a result. Also, the linker error on __bad_SEG is fixed. Signed-off-by: Chandramouli Narayanan <chandramouli.narayanan@intel.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | module: Consolidate lots of 32/64-bit codeMatt Fleming2012-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Only carry different code for i386/x86-64 if we really need it. There's plenty of code that can be shared between the two which eases the maintenance burden and also makes it easier to merge code from other branches which don't have the 32/64 split. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | Merge remote-tracking branch 'mfleming/elflink' into for-hpa/elflink/firmwareMatt Fleming2012-08-131-1/+1
|\ \ \ | |/ / | | | | | | | | | Conflicts: com32/lib/sys/module/common.c
| * | com32: Use --as-needed for LDFLAGSMatt Fleming2012-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>