summaryrefslogtreecommitdiff
path: root/diag/mbr/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Add per-firmware object directory supportMatt Fleming2012-10-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* The make files have undergone changes to support both i386 and x86_64 platforms.chandramouli narayanan2012-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Makefile: Move Makefile fragments into mk/Matt Fleming2011-04-071-1/+2
| | | | | | | | | | | | | | | | | | Move the MCONFIG files into a mk/ directory and give them more descriptive names. This is purely a cosmetic change to make the 'include' directives a bit more coherent by making it obvious exactly which MCONFIG file we're including. For example, in com32/lua/src/Makefile we exchange the line, include ../../MCONFIG for the much more comprehensible, include $(MAKEDIR)/com32.mk Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* diag/mbr/: use checksize.pl to pad/prevent overflowGene Cumm2011-03-161-1/+7
| | | | HPA noticed that using Fedora 15 Alpha and gcc-4.6 broke on this code
* diag/mbr: Remove unneeded dependency from MakefileGene Cumm2011-03-091-1/+1
|
* diag/: Add Makefile,README here and mbr/Gene Cumm2011-03-091-0/+45