aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorchandramouli narayanan <mouli@linux.intel.com>2012-06-25 12:45:26 -0700
committerchandramouli narayanan <mouli@linux.intel.com>2012-06-25 12:45:26 -0700
commit38e58635d3868c23537fc5dce87b152a52df34ad (patch)
treef5677ef70b952068e8ebcd0f20daf06f50f8c178 /Makefile
parentd8eede3f2a360163235fad222a0190cd7c5bef38 (diff)
downloadsyslinux-38e58635d3868c23537fc5dce87b152a52df34ad.tar.gz
syslinux-38e58635d3868c23537fc5dce87b152a52df34ad.tar.xz
syslinux-38e58635d3868c23537fc5dce87b152a52df34ad.zip
The make files have undergone changes to support both i386 and x86_64 platforms.
Pertinent changes are sprinkled through *.mk and Makefile in the syslinux tree. Build architecture is specified at the command line via ARCH macro. This is to enable whether one is building for the native platform or cross-building for a different architecture. Currently, the only supported architectures via ARCH macro are i386 and x86_64. There are some modules (e.g. memdump) that don't build under the EFI environment. To go forward with efi boot support, a separate EFI_BUILD=1 macro has been added and is required to be specified while building. This is a temporary solution for the current build environment. example build: On a x86_64 platform, the following cross-builds syslinux for i386 To build for i386: make EFI_BUILD=1 ARCH=i386 On a x86_64 platform, the following builds syslinux for x86_64 To build natively: make EFI_BUILD=1 Changes specific to GCC and LD options: Architecture specific flags and include/search directories are set up for GCC and LD commands. Internally, GCC options such as stack-boundary, PIC and machine architecture are set up based on ARCH macro. While stack-boundary=2 is fine for i386, it does not work for x86_64 and so it is left to the default value. Using -fPIE with gcc does not work with ld on x86_64, but -fPIC works fine. Similarly, target and elf options are set up for linking as approrpriate for architecture. Assumption about gnu-efi install path: Since the EFI build supports both EFI32 and EFI64, the following assumptions are made with regard to the installed location of gnu-efi on the build platform. 1. gnu-efi-ia32: assumed installed in /usr/local [ EFI-32 include files in /usr/local/include/efi and gnu-efi library in /usr/local/lib/ ] 2. gnu-efi-x86_64: assumed installed in /usr [ EFI-64 include files in /usr/include/efi and gnu-efi library in /usr/lib64/ ] Remanants of the unused old i386-only files, if any, need to be pruned.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 0e799101..45d0b193 100644
--- a/Makefile
+++ b/Makefile
@@ -31,10 +31,19 @@ include $(MAKEDIR)/syslinux.mk
#
# List of module objects that should be installed for all derivatives
+ifndef EFI_BUILD
MODULES = memdisk/memdisk memdump/memdump.com modules/*.com \
com32/menu/*.c32 com32/modules/*.c32 com32/mboot/*.c32 \
com32/hdt/*.c32 com32/rosh/*.c32 com32/gfxboot/*.c32 \
com32/sysdump/*.c32 com32/lua/src/*.c32
+else
+# memdump is BIOS specific code exclude it for EFI
+# FIXME: Prune other BIOS-centric modules
+MODULES = memdisk/memdisk modules/*.com \
+ com32/menu/*.c32 com32/modules/*.c32 com32/mboot/*.c32 \
+ com32/hdt/*.c32 com32/rosh/*.c32 com32/gfxboot/*.c32 \
+ com32/sysdump/*.c32 com32/lua/src/*.c32
+endif
# syslinux.exe is BTARGET so as to not require everyone to have the
# mingw suite installed
@@ -53,8 +62,15 @@ BOBJECTS = $(BTARGET) \
# Note: libinstaller is both a BSUBDIR and an ISUBDIR. It contains
# files that depend only on the B phase, but may have to be regenerated
# for "make installer".
+ifndef EFI_BUILD
BSUBDIRS = codepage com32 lzo core memdisk modules mbr memdump gpxe sample \
diag libinstaller dos win32 win64 dosutil efi
+else
+# memdump is BIOS specific code exclude it for EFI
+# FIXME: Prune other BIOS-centric modules
+BSUBDIRS = codepage com32 lzo core memdisk modules mbr gpxe sample \
+ diag libinstaller win32 win64 dosutil efi
+endif
ITARGET =
IOBJECTS = $(ITARGET) \
utils/gethostip utils/isohybrid utils/mkdiskimage \