1a47a12beSStefan Roese# 2a47a12beSStefan Roese# (C) Copyright 2000-2006 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 Roeseinclude $(TOPDIR)/config.mk 25a47a12beSStefan Roese 26a47a12beSStefan RoeseLIB = $(obj)lib$(ARCH).a 27a47a12beSStefan Roese 28a47a12beSStefan RoeseSOBJS-y += ppccache.o 29a47a12beSStefan RoeseSOBJS-y += ppcstring.o 30a47a12beSStefan RoeseSOBJS-y += ticks.o 31a47a12beSStefan RoeseSOBJS-y += reloc.o 32a47a12beSStefan Roese 33a47a12beSStefan RoeseCOBJS-y += bat_rw.o 34a47a12beSStefan RoeseCOBJS-y += board.o 35a47a12beSStefan RoeseCOBJS-y += bootm.o 36e4a95d11SStefan RoeseCOBJS-$(CONFIG_BOOTCOUNT_LIMIT) += bootcount.o 37a47a12beSStefan RoeseCOBJS-y += cache.o 38a47a12beSStefan RoeseCOBJS-y += extable.o 39a47a12beSStefan RoeseCOBJS-y += interrupts.o 40a47a12beSStefan RoeseCOBJS-$(CONFIG_CMD_KGDB) += kgdb.o 41a47a12beSStefan RoeseCOBJS-y += time.o 42a47a12beSStefan Roese 43*4ccd5510SWolfgang Denk# Workaround for local bus unaligned access problems 44*4ccd5510SWolfgang Denk# on MPC512x and MPC5200 45*4ccd5510SWolfgang Denkifdef CONFIG_MPC512X 46*4ccd5510SWolfgang Denk$(obj)ppcstring.o: AFLAGS += -Dmemcpy=__memcpy 47*4ccd5510SWolfgang DenkCOBJS-y += memcpy_mpc5200.o 48*4ccd5510SWolfgang Denkendif 49460c2ce3SWolfgang Denkifdef CONFIG_MPC5200 50460c2ce3SWolfgang Denk$(obj)ppcstring.o: AFLAGS += -Dmemcpy=__memcpy 51*4ccd5510SWolfgang DenkCOBJS-y += memcpy_mpc5200.o 52460c2ce3SWolfgang Denkendif 53460c2ce3SWolfgang Denk 54*4ccd5510SWolfgang DenkCOBJS += $(sort $(COBJS-y)) 55*4ccd5510SWolfgang Denk 56*4ccd5510SWolfgang DenkSRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) 57*4ccd5510SWolfgang DenkOBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) 58*4ccd5510SWolfgang Denk 59a47a12beSStefan Roese$(LIB): $(obj).depend $(OBJS) 60a47a12beSStefan Roese @if ! $(CROSS_COMPILE)readelf -S $(OBJS) | grep -q '\.fixup.*PROGBITS';\ 61a47a12beSStefan Roese then \ 62a47a12beSStefan Roese echo "ERROR: Your compiler doesn't generate .fixup sections!";\ 63a47a12beSStefan Roese echo " Upgrade to a recent toolchain."; \ 64a47a12beSStefan Roese exit 1; \ 65a47a12beSStefan Roese fi; 66a47a12beSStefan Roese $(AR) $(ARFLAGS) $@ $(OBJS) 67a47a12beSStefan Roese 68a47a12beSStefan Roese######################################################################### 69a47a12beSStefan Roese 70a47a12beSStefan Roese# defines $(obj).depend target 71a47a12beSStefan Roeseinclude $(SRCTREE)/rules.mk 72a47a12beSStefan Roese 73a47a12beSStefan Roesesinclude $(obj).depend 74a47a12beSStefan Roese 75a47a12beSStefan Roese######################################################################### 76