debuggers.hg

view tools/firmware/etherboot/Makefile @ 16994:f3b418afc6be

etherboot: Fix the build.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jan 31 14:01:59 2008 +0000 (2008-01-31)
parents 5c30a9dec02d
children 42369d21641d
line source
2 EB_VERSION=5.4.2
4 override XEN_TARGET_ARCH = x86_32
5 XEN_ROOT = ../../..
6 include $(XEN_ROOT)/tools/Rules.mk
8 D=etherboot-$(EB_VERSION)
9 T=etherboot-$(EB_VERSION).tar.gz
10 E=etherboot-build
12 TARGETS=eb-rtl8139.zrom.h
14 all: $(TARGETS)
16 eb-%.zrom.h: $E/src/Config
17 $(MAKE) -C $E/src bin/$*.zrom
18 ../hvmloader/mkhex etherboot <$E/src/bin/$*.zrom >$@.new
19 mv -f $@.new $@
21 $E/src/Config: $T Config
22 rm -rf $D $E
23 tar zxf $T
24 cat Config >>$D/src/Config
25 @
26 # override many of the settings in Config
27 echo ARCH=i386 >>$D/src/Config
28 echo "HOST_CC=$(HOSTCC)" >>$D/src/Config
29 echo "CPP=$(CPP)" >>$D/src/Config
30 echo "CC=$(CC)" >>$D/src/Config
31 echo "AS=$(CC) -c -x assembler -" >>$D/src/Config
32 echo "LD=$(LD)" >>$D/src/Config
33 echo "SIZE=$(SIZE)" >>$D/src/Config
34 echo "AR=$(AR)" >>$D/src/Config
35 echo "RANLIB=$(RANLIB)" >>$D/src/Config
36 echo "OBJCOPY=$(OBJCOPY)" >>$D/src/Config
37 echo "CFLAGS+=$(CFLAGS)" >>$D/src/Config
38 echo "ASFLAGS+=$(CFLAGS)" >>$D/src/Config
39 echo "LDFLAGS+=$(LDFLAGS_DIRECT)" >>$D/src/Config
40 @
41 set -e; cd $D/src/arch/i386; \
42 sed -e '/ifneq.*GCC_MINORVERSION/,/endif/ s/^/#/' \
43 Config >Config.new; \
44 mv Config.new Config
45 mv $D $E
47 clean:
48 rm -rf $D $E *.zrom.h *~
50 .PHONY: all clean