ia64/xen-unstable

view xen/arch/powerpc/Rules.mk @ 16421:5b1120109823

Header dependency fix.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Nov 22 14:04:44 2007 +0000 (2007-11-22)
parents c9720159b983
children
line source
1 HAS_PPC64 := y
3 CC := $(CROSS_COMPILE)gcc
4 LD := $(CROSS_COMPILE)ld
6 # These are goodess that applies to all source.
7 C_WARNINGS := -Wredundant-decls
9 # _no_ common code can have packed data structures or we are in touble.
10 C_WARNINGS += -Wpacked
12 CFLAGS += -m64 -ffreestanding -fno-builtin -fno-common
13 CFLAGS += -iwithprefix include -Werror -pipe
14 CFLAGS += -I$(BASEDIR)/include
15 CFLAGS += -I$(BASEDIR)/include/asm-powerpc/mach-default
16 CFLAGS += $(C_WARNINGS)
17 CFLAGS += -msoft-float -O2
18 CFLAGS-$(debug) += -O0 # last one wins
19 CFLAGS-$(papr_vterm) += -DPAPR_VDEVICE -DPAPR_VTERM
21 LDFLAGS += -m elf64ppc
23 #
24 # command to embed a binary inside a .o
25 #
26 %.o: %.bin
27 $(CROSS_COMPILE)objcopy --input-target=binary \
28 --output-target=elf64-powerpc \
29 --binary-architecture=powerpc \
30 --redefine-sym _binary_$*_bin_start=$*_start \
31 --redefine-sym _binary_$*_bin_end=$*_end \
32 --redefine-sym _binary_$*_bin_size=$*_size \
33 $< $@
35 HDRS += $(wildcard $(BASEDIR)/include/asm-powerpc/mach-*/*.h)
37 # Test for at least GCC v3.2.x.
38 gcc-ver = $(shell $(CC) -dumpversion | sed -e 's/^\(.\)\.\(.\)\.\(.\)/\$(1)/')
39 ifeq ($(call gcc-ver,1),1)
40 $(error gcc-1.x.x unsupported - upgrade to at least gcc-3.2.x)
41 endif
42 ifeq ($(call gcc-ver,1),2)
43 $(error gcc-2.x.x unsupported - upgrade to at least gcc-3.2.x)
44 endif
45 ifeq ($(call gcc-ver,1),3)
46 ifeq ($(call gcc-ver,2),0)
47 $(error gcc-3.0.x unsupported - upgrade to at least gcc-3.2.x)
48 endif
49 ifeq ($(call gcc-ver,2),1)
50 $(error gcc-3.1.x unsupported - upgrade to at least gcc-3.2.x)
51 endif
52 endif