Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / SLOF / make.rules
1 # *****************************************************************************
2 # * Copyright (c) 2004, 2008 IBM Corporation
3 # * All rights reserved.
4 # * This program and the accompanying materials
5 # * are made available under the terms of the BSD License
6 # * which accompanies this distribution, and is available at
7 # * http://www.opensource.org/licenses/bsd-license.php
8 # *
9 # * Contributors:
10 # *     IBM Corporation - initial implementation
11 # ****************************************************************************/
12
13 #############################################################################
14 # BUILD ENV SETTINGS
15 #############################################################################
16
17 # CROSS is the prefix of your cross-compiler.
18 # You can override this variable in your environment (export CROSS=...).
19 ARCH := $(shell uname -p)
20
21 # Auto-detect ppc64
22 ifeq ($(ARCH), ppc64)
23 CROSS          = ""
24 else
25 CROSS           ?= powerpc64-linux-
26 endif
27
28 CELLSIZE        ?= 64
29
30 HOSTCC          ?= gcc
31 HOSTCFLAGS      = -g -Wall -W -O2 -I. -I../include
32 DD              = dd
33
34 ONLY_CC         = $(CROSS)gcc -m$(CELLSIZE)
35 ONLY_AS         = $(CROSS)as -m$(CELLSIZE)
36 ONLY_LD         = $(CROSS)ld -melf$(CELLSIZE)ppc
37
38 # Verbose level:
39 #   V=0 means completely silent
40 #   V=1 means brief output
41 #   V=2 means full output
42 V               ?= 1
43
44 ifeq ($(V),0)
45 Q               := @
46 MAKEFLAGS       += --silent
47 MAKE            += -s
48 endif
49
50 ifeq ($(V),1)
51 MAKEFLAGS       += --silent
52 MAKE            += -s
53 CC              = printf "\t[CC]\t%s\n" `basename "$@"`; $(ONLY_CC)
54 AS              = printf "\t[AS]\t%s\n" `basename "$@"`; $(ONLY_AS)
55 LD              = printf "\t[LD]\t%s\n" `basename "$@"`; $(ONLY_LD)
56 CLEAN           = printf "\t[CLEAN]\t%s\n" "$(DIRECTORY)$$dir"
57 else
58 CC              = $(ONLY_CC)
59 AS              = $(ONLY_AS)
60 LD              = $(ONLY_LD)
61 CLEAN           = echo -n
62 endif
63
64 OBJCOPY         ?= $(CROSS)objcopy
65 OBJDUMP         ?= $(CROSS)objdump
66 STRIP           ?= $(CROSS)strip
67 AR              ?= $(CROSS)ar
68 RANLIB          ?= $(CROSS)ranlib
69 CPP             ?= $(CROSS)cpp
70
71 WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes
72 CFLAGS ?= -g -O2 -fno-builtin -ffreestanding -nostdinc -msoft-float -fno-strict-aliasing \
73           -mno-altivec -mabi=no-altivec -fno-stack-protector $(WARNFLAGS)
74
75 export CC AS LD CLEAN OBJCOPY OBJDUMP STRIP AR RANLIB CFLAGS
76