1a47a12beSStefan Roese# 2*fa11dbe5SWolfgang Denk# (C) Copyright 2000-2010 3a47a12beSStefan Roese# Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4a47a12beSStefan Roese# 5a47a12beSStefan Roese# See file CREDITS for list of people who contributed to this 6a47a12beSStefan Roese# project. 7a47a12beSStefan Roese# 8a47a12beSStefan Roese# This program is free software; you can redistribute it and/or 9a47a12beSStefan Roese# modify it under the terms of the GNU General Public License as 10a47a12beSStefan Roese# published by the Free Software Foundation; either version 2 of 11a47a12beSStefan Roese# the License, or (at your option) any later version. 12a47a12beSStefan Roese# 13a47a12beSStefan Roese# This program is distributed in the hope that it will be useful, 14a47a12beSStefan Roese# but WITHOUT ANY WARRANTY; without even the implied warranty of 15a47a12beSStefan Roese# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16a47a12beSStefan Roese# GNU General Public License for more details. 17a47a12beSStefan Roese# 18a47a12beSStefan Roese# You should have received a copy of the GNU General Public License 19a47a12beSStefan Roese# along with this program; if not, write to the Free Software 20a47a12beSStefan Roese# Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21a47a12beSStefan Roese# MA 02111-1307 USA 22a47a12beSStefan Roese# 23a47a12beSStefan Roese 24a47a12beSStefan RoeseCROSS_COMPILE ?= ppc_8xx- 25a47a12beSStefan Roese 26a47a12beSStefan RoeseSTANDALONE_LOAD_ADDR = 0x40000 27a47a12beSStefan Roese 28a47a12beSStefan RoesePLATFORM_RELFLAGS += -mrelocatable 29a47a12beSStefan RoesePLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__ 30a47a12beSStefan RoesePLATFORM_LDFLAGS += -n 31a47a12beSStefan Roese 32*fa11dbe5SWolfgang Denkifdef CONFIG_SYS_LDSCRIPT 33*fa11dbe5SWolfgang Denk# need to strip off double quotes 34*fa11dbe5SWolfgang DenkLDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT)) 35*fa11dbe5SWolfgang Denkelse ifdef CONFIG_NAND_SPL 36*fa11dbe5SWolfgang DenkLDSCRIPT := $(SRCTREE)/$(CONFIG_BOARDDIR)/u-boot-nand.lds 37*fa11dbe5SWolfgang Denkelse 38*fa11dbe5SWolfgang Denkifneq ($(wildcard $(SRCTREE)/arch/powerpc/cpu/$(CPU)/u-boot.lds),) 39*fa11dbe5SWolfgang DenkLDSCRIPT := $(SRCTREE)/arch/powerpc/cpu/$(CPU)/u-boot.lds 40*fa11dbe5SWolfgang Denkendif 41*fa11dbe5SWolfgang Denkendif 42*fa11dbe5SWolfgang Denk 43a47a12beSStefan Roese# 44a47a12beSStefan Roese# When cross-compiling on NetBSD, we have to define __PPC__ or else we 45a47a12beSStefan Roese# will pick up a va_list declaration that is incompatible with the 46a47a12beSStefan Roese# actual argument lists emitted by the compiler. 47a47a12beSStefan Roese# 48a47a12beSStefan Roese# [Tested on NetBSD/i386 1.5 + cross-powerpc-netbsd-1.3] 49a47a12beSStefan Roese 50a47a12beSStefan Roeseifeq ($(CROSS_COMPILE),powerpc-netbsd-) 51a47a12beSStefan RoesePLATFORM_CPPFLAGS+= -D__PPC__ 52a47a12beSStefan Roeseendif 53a47a12beSStefan Roeseifeq ($(CROSS_COMPILE),powerpc-openbsd-) 54a47a12beSStefan RoesePLATFORM_CPPFLAGS+= -D__PPC__ 55a47a12beSStefan Roeseendif 56