checksumiso: pad isolinux.bin to a sector boundary
[syslinux.git] / mbr / Makefile
blob7952e60b79a5a140a2b307a43cae9c29100dcb00
1 ## -----------------------------------------------------------------------
2 ##
3 ## Copyright 2007-2008 H. Peter Anvin - All Rights Reserved
4 ##
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 ## Boston MA 02111-1307, USA; either version 2 of the License, or
9 ## (at your option) any later version; incorporated herein by reference.
11 ## -----------------------------------------------------------------------
14 # Makefile for MBR
17 topdir = ..
18 include $(topdir)/MCONFIG.embedded
20 all: mbr.bin gptmbr.bin
22 .PRECIOUS: %.o
23 %.o: %.S
24 $(CC) $(SFLAGS) -Wa,-a=$*.lst -c -o $@ $<
26 mbr.elf: mbr.o mbr.ld
27 $(LD) $(LDFLAGS) -T mbr.ld -e _start -o $@ $<
29 mbr.bin: mbr.elf checksize.pl
30 $(OBJCOPY) -O binary $< $@
31 $(PERL) checksize.pl mbr.bin 440
33 mbr_bin.c: mbr.bin
35 gptmbr.elf: gptmbr.o mbr.ld
36 $(LD) $(LDFLAGS) -T mbr.ld -e _start -o $@ $<
38 gptmbr.bin: gptmbr.elf checksize.pl
39 $(OBJCOPY) -O binary $< $@
40 $(PERL) checksize.pl gptmbr.bin 424
42 tidy dist:
43 rm -f *.o *.elf *.lst
45 clean: tidy
47 spotless: clean
48 rm -f *.bin