Releasing debian version 4.04+dfsg-9.
[syslinux-debian/hramrach.git] / diag / mbr / Makefile
bloba94253af5a805495acb29c56052cb28cd6827d13
1 ## -----------------------------------------------------------------------
2 ##
3 ## Copyright 2007-2009 H. Peter Anvin - All Rights Reserved
4 ## Copyright 2009 Intel Corporation; author: H. Peter Anvin
5 ##
6 ## This program is free software; you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation, Inc., 53 Temple Place Ste 330,
9 ## Boston MA 02111-1307, USA; either version 2 of the License, or
10 ## (at your option) any later version; incorporated herein by reference.
12 ## -----------------------------------------------------------------------
15 # Makefile for MBR
18 topdir = ../..
19 mbrdir = $(topdir)/mbr
20 include $(topdir)/MCONFIG.embedded
22 all: handoff.bin
24 %.o: %.S
25 $(CC) $(MAKEDEPS) $(SFLAGS) -Wa,-a=$*.lst -c -o $@ $<
27 .PRECIOUS: %.elf
28 %.elf: %.o $(mbrdir)/mbr.ld
29 $(LD) $(LDFLAGS) -T $(mbrdir)/mbr.ld -e _start -o $@ $<
31 %.bin: %.elf $(mbrdir)/checksize.pl
32 $(OBJCOPY) -O binary $< $@
33 $(PERL) checksize.pl $@
34 $(CHMOD) -x $@
36 handoff.bin: handoff.elf $(mbrdir)/checksize.pl
37 $(OBJCOPY) -O binary $< $@
38 $(PERL) $(mbrdir)/checksize.pl $@ 420
39 $(CHMOD) -x $@
41 mbr_bin.c: mbr.bin
43 tidy dist:
44 rm -f *.o *.elf *.lst .*.d
46 clean: tidy
48 spotless: clean
49 rm -f *.bin
51 -include .*.d