path: root/mbr/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Add per-firmware object directory supportMatt Fleming2012-10-161-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* isohybrid: support booting from partition; fix CBIOS bootingH. Peter Anvin2009-05-211-4/+5
| | | | | | | | Fix CBIOS in isohybrid mode. Also allow an isohybrid image to be booted from a partition. Unfortunately this breaks compatibility between differing versions of isohybrid and isolinux.bin. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Unify dependency generation: MCONFIG.embeddedH. Peter Anvin2009-04-271-3/+3
| | | | | | | Unify dependency generation and move common rules into MCONFIG.embedded. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Unify dependency generationH. Peter Anvin2009-04-271-4/+4
| | | | | | | | | | | | Make the dependency generation more common; have a general pattern in MCONFIG, and use it in rules (not in CFLAGS). For NASM source, in order to stay compatible with old versions of NASM, run NASM twice; newer versions of NASM is capable of generating dependencies simultaneously like gcc can, but that would break compatibility with older distros. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* mbr: generate normal versions, force-80 versions, and ctrl-80 versionsH. Peter Anvin2009-04-041-17/+15
| | | | | | | Produce MBR variants with normal (DL) behavior, force to drive 80 behavior, and force to 80 on Ctrl pressed behavior. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* altmbr: an alternative MBR which ignores the active flagH. Peter Anvin2009-03-301-1/+5
| | | | | | | | | | | Impact: new feature Create an alternative MBR which takes a partition number in byte 439 instead of looking at the active flag. This is useful when dual-booting legacy operating systems which assume that their particular partition must be the active partition. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* mbr/Makefile: run checksize on the proper binaries...syslinux-3.72-pre4H. Peter Anvin2008-09-071-3/+3
| | | | | | | There is a reason other than stylistic for using macros like $@ in explicit rules, and that is that they get copied and pasted around... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ISOLINUX: support for hybrid mode (CD-ROM/USB key)H. Peter Anvin2008-09-051-5/+7
| | | | | | Still a work in progress. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Clean up embedded Makefile targets; fix build failureH. Peter Anvin2008-08-221-11/+1
| | | | | | Unify common pieces to "embedded" targets (those that produce code that runs neither in the host nor in a com32 environment); this fixes the broken sample/ directory Makefile.
* Major Makefile cleanups; gcc 4.3.0 compatiblityH. Peter Anvin2008-08-201-10/+7
| | | | | Cleanup and centralize the Makefile system even more. Fix a gcc 4.3 incompatibility in memdisk (definition of strlen).
* Build _bin.c files in libinstaller; clean up B/I separationH. Peter Anvin2008-06-271-5/+2
| | | | | | | Clean up the BSUBDIR/ISUBDIR separation further. Build _bin.c files, which are an intermediate stage toward building the installers, in the libinstaller directory, since that directory is used by all the installers anyway. That also lets us get bin2c.pl out of the root.
* mbr: clean up *_bin.c filesH. Peter Anvin2008-05-291-1/+1
* Move files out of root into core, dos, and utilsH. Peter Anvin2008-05-291-5/+11
| | | | | | | | Move source files out of the root directory; the root is a mess and has become virtually unmaintainable. The Syslinux core now lives in core/; the Linux and generic utilities has moved into utils/, and copybs.com has moved into dos/; it had to go somewhere, and it seemed as good a place as any.
* Merge commit 'origin/gptmbr'H. Peter Anvin2008-05-131-1/+8
| * Master boot record for GPT partition tablesH. Peter Anvin2008-02-251-1/+8
| | | | | | | | Beginnings of a master boot record for GPT partition tables.
* | Use $(CC) in gcc_ok macro, not plain gccH. Peter Anvin2008-03-051-1/+1
|/ | | | | Use $(CC) in gcc_ok macro, not plain gcc. This seems to work, iff the gcc_ok macro is declared with =, not :=
* Update copyright yearH. Peter Anvin2008-01-101-1/+1
* mbr: remove *.bin on "spotless", not "clean"syslinux-3.53H. Peter Anvin2007-11-171-1/+1
| | | | | Remove mbr/*.bin on "spotless", not "clean"; otherwise we break "make installer".
* Fix [BI]ESUBDIRS for make installer/tidy/clean/spotlessH. Peter Anvin2007-11-011-0/+2
| | | | Fix the handling of [BI]ESUBDIRS for other targets than "all".
* Don't clobber /dev/null when compiling as rootLuciano Rocha2007-05-251-2/+4
| | | | | | Compiling as root is highly discouraged, but some people do it anyway. gcc_ok, however, can clobber /dev/null due to "-o /dev/null"; this is bad. Instead, write a temporary file and delete it.
* Stealth whitespace cleanup (automated)H. Peter Anvin2007-03-141-1/+1
* Deal with various distributions breaking gcc in weird waysH. Peter Anvin2007-02-061-1/+1
* Fix numerous problems in the new MBR code.syslinux-3.36-pre5H. Peter Anvin2007-02-041-2/+2
* MBR: produce a list file.H. Peter Anvin2007-02-041-4/+4
* New MBR which supports logical partitions.H. Peter Anvin2007-02-041-0/+47
New MBR which supports logical partitions. Move the MBR to a subdirectory, and convert it to gas with the expectation of including it in util-linux.