summaryrefslogtreecommitdiffstats
path: root/arch/ppc/Makefile
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-07-05 18:01:28 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-07-05 18:01:28 +0200
commit0d3d354cf66cccd0d3932dd18c7dffc96c8c23de (patch)
tree89b762ae72b8e21924c8bdaaa71c63c37804347c /arch/ppc/Makefile
parentceddda143b55019ed6be8a331b5ed218a1c64d3b (diff)
downloadbarebox-0d3d354cf66cccd0d3932dd18c7dffc96c8c23de.tar.gz
barebox-0d3d354cf66cccd0d3932dd18c7dffc96c8c23de.tar.xz
svn_rev_155
on the way to compile powerpc
Diffstat (limited to 'arch/ppc/Makefile')
-rw-r--r--arch/ppc/Makefile102
1 files changed, 56 insertions, 46 deletions
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile
index 2ba034f1ee..68d85314a3 100644
--- a/arch/ppc/Makefile
+++ b/arch/ppc/Makefile
@@ -1,46 +1,56 @@
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# See file CREDITS for list of people who contributed to this
-# project.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA 02111-1307 USA
-#
-
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)lib$(ARCH).a
-
-SOBJS = ppcstring.o ticks.o
-
-COBJS = board.o \
- bat_rw.o cache.o extable.o kgdb.o time.o interrupts.o
-
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
-
-$(LIB): $(obj).depend $(OBJS)
- $(AR) $(ARFLAGS) $@ $(OBJS)
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+
+CPPFLAGS += -fno-builtin -ffreestanding -nostdinc -Wall \
+ -isystem $(gccincdir) -ffixed-r14 -meabi -Wstrict-prototypes -fPIC -D __PPC__ -D CONFIG_PPC \
+
+
+machine-$(CONFIG_ARCH_MPC5200) := mpc5200
+board-$(CONFIG_MACH_PHYCORE_MPC5200B_TINY) := phycore_mpc5200b_tiny
+cpu-$(CONFIG_MPC5200) := mpc5xxx
+
+TEXT_BASE = $(CONFIG_TEXT_BASE)
+
+CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -P
+CFLAGS := -fno-common -Os
+LDFLAGS_vmlinux :=-L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc -Ttext $(TEXT_BASE)
+
+ifeq ($(incdir-y),)
+incdir-y := $(machine-y)
+endif
+INCDIR := arch-$(incdir-y)
+
+# Update machine arch and proc symlinks if something which affects
+# them changed. We use .arch to indicate when they were updated
+# last, otherwise make uses the target directory mtime.
+
+include/asm-ppc/.arch: $(wildcard include/config/arch/*.h) include/config/auto.conf
+ @echo ' SYMLINK include/asm-ppc/arch -> include/asm-ppc/$(INCDIR)'
+ifneq ($(KBUILD_SRC),)
+ $(Q)mkdir -p include/asm-ppc
+ $(Q)ln -fsn $(srctree)/include/asm-ppc/$(INCDIR) include/asm-ppc/arch
+else
+ $(Q)ln -fsn $(INCDIR) include/asm-ppc/arch
+endif
+ @touch $@
+
+archprepare: maketools
+
+PHONY += maketools
+maketools: include/asm-ppc/.arch
+
+
+ifneq ($(board-y),)
+BOARD := board/$(board-y)/
+else
+BOARD :=
+endif
+
+ifneq ($(cpu-y),)
+CPU := cpu/$(cpu-y)/
+else
+CPU :=
+endif
+
+common-y += $(BOARD) $(CPU)
+common-y += arch/ppc/lib/
+
+MRPROPER_FILES += include/asm-ppc/arch