2003-03-27 12:09:35 +00:00
|
|
|
#
|
2006-09-01 17:49:50 +00:00
|
|
|
# (C) Copyright 2003-2006
|
2003-03-27 12:09:35 +00:00
|
|
|
# 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
|
|
|
|
|
2010-11-05 14:48:07 +00:00
|
|
|
LIB = $(obj)lib$(ARCH).o
|
2003-03-27 12:09:35 +00:00
|
|
|
|
2012-08-12 14:53:35 +00:00
|
|
|
## Build a couple of necessary functions into a private libgcc
|
|
|
|
LIBGCC = $(obj)libgcc.o
|
|
|
|
GLSOBJS += ashldi3.o
|
|
|
|
GLSOBJS += ashrdi3.o
|
|
|
|
GLSOBJS += lshrdi3.o
|
|
|
|
LGOBJS := $(addprefix $(obj),$(GLSOBJS))
|
|
|
|
|
2008-02-27 10:00:47 +00:00
|
|
|
SOBJS-y +=
|
2003-03-27 12:09:35 +00:00
|
|
|
|
2008-02-27 10:00:47 +00:00
|
|
|
COBJS-y += board.o
|
2008-09-08 18:54:39 +00:00
|
|
|
ifeq ($(CONFIG_QEMU_MIPS),y)
|
|
|
|
COBJS-y += bootm_qemu_mips.o
|
|
|
|
else
|
2008-02-27 10:00:47 +00:00
|
|
|
COBJS-y += bootm.o
|
2008-09-08 18:54:39 +00:00
|
|
|
endif
|
2003-03-27 12:09:35 +00:00
|
|
|
|
2008-05-20 14:00:29 +00:00
|
|
|
SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
|
2008-02-27 10:00:47 +00:00
|
|
|
OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
|
2003-03-27 12:09:35 +00:00
|
|
|
|
2012-08-12 14:53:35 +00:00
|
|
|
# Always build libmips.o
|
|
|
|
TARGETS := $(LIB)
|
|
|
|
|
|
|
|
# Build private libgcc only when asked for
|
|
|
|
ifdef USE_PRIVATE_LIBGCC
|
|
|
|
TARGETS += $(LIBGCC)
|
|
|
|
endif
|
|
|
|
|
|
|
|
all: $(TARGETS)
|
|
|
|
|
2006-09-01 17:49:50 +00:00
|
|
|
$(LIB): $(obj).depend $(OBJS)
|
2010-11-05 14:48:07 +00:00
|
|
|
$(call cmd_link_o_target, $(OBJS))
|
2003-03-27 12:09:35 +00:00
|
|
|
|
2012-08-12 14:53:35 +00:00
|
|
|
$(LIBGCC): $(obj).depend $(LGOBJS)
|
|
|
|
$(call cmd_link_o_target, $(LGOBJS))
|
|
|
|
|
2003-03-27 12:09:35 +00:00
|
|
|
#########################################################################
|
|
|
|
|
2006-09-01 17:49:50 +00:00
|
|
|
# defines $(obj).depend target
|
|
|
|
include $(SRCTREE)/rules.mk
|
2003-03-27 12:09:35 +00:00
|
|
|
|
2006-09-01 17:49:50 +00:00
|
|
|
sinclude $(obj).depend
|
2003-03-27 12:09:35 +00:00
|
|
|
|
|
|
|
#########################################################################
|