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
10 # * IBM Corporation - initial implementation
11 # ****************************************************************************/
13 #############################################################################
15 #############################################################################
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)
25 CROSS ?= powerpc64-linux-
31 HOSTCFLAGS = -g -Wall -W -O2 -I. -I../include
34 ONLY_CC = $(CROSS)gcc -m$(CELLSIZE)
35 ONLY_AS = $(CROSS)as -m$(CELLSIZE)
36 ONLY_LD = $(CROSS)ld -melf$(CELLSIZE)ppc
39 # V=0 means completely silent
40 # V=1 means brief output
41 # V=2 means full output
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"
64 OBJCOPY ?= $(CROSS)objcopy
65 OBJDUMP ?= $(CROSS)objdump
66 STRIP ?= $(CROSS)strip
68 RANLIB ?= $(CROSS)ranlib
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)
75 export CC AS LD CLEAN OBJCOPY OBJDUMP STRIP AR RANLIB CFLAGS