2003-03-27 21:09:35 +09:00
|
|
|
#
|
2006-09-02 02:49:50 +09:00
|
|
|
# (C) Copyright 2003-2006
|
2003-03-27 21:09:35 +09:00
|
|
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
#
|
2013-07-08 16:37:19 +09:00
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
2003-03-27 21:09:35 +09:00
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/config.mk
|
|
|
|
|
2010-11-05 23:48:07 +09:00
|
|
|
LIB = $(obj)lib$(ARCH).o
|
2003-03-27 21:09:35 +09:00
|
|
|
|
2012-08-12 23:53:35 +09: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 19:00:47 +09:00
|
|
|
SOBJS-y +=
|
2003-03-27 21:09:35 +09:00
|
|
|
|
2008-02-27 19:00:47 +09:00
|
|
|
COBJS-y += board.o
|
2008-09-09 03:54:39 +09:00
|
|
|
ifeq ($(CONFIG_QEMU_MIPS),y)
|
2013-06-26 22:55:16 +09:00
|
|
|
COBJS-$(CONFIG_CMD_BOOTM) += bootm_qemu_mips.o
|
2008-09-09 03:54:39 +09:00
|
|
|
else
|
2013-06-26 22:55:16 +09:00
|
|
|
COBJS-$(CONFIG_CMD_BOOTM) += bootm.o
|
2008-09-09 03:54:39 +09:00
|
|
|
endif
|
2003-03-27 21:09:35 +09:00
|
|
|
|
2008-05-20 23:00:29 +09:00
|
|
|
SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
|
2008-02-27 19:00:47 +09:00
|
|
|
OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
|
2003-03-27 21:09:35 +09:00
|
|
|
|
2012-08-12 23:53:35 +09: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-02 02:49:50 +09:00
|
|
|
$(LIB): $(obj).depend $(OBJS)
|
2010-11-05 23:48:07 +09:00
|
|
|
$(call cmd_link_o_target, $(OBJS))
|
2003-03-27 21:09:35 +09:00
|
|
|
|
2012-08-12 23:53:35 +09:00
|
|
|
$(LIBGCC): $(obj).depend $(LGOBJS)
|
|
|
|
$(call cmd_link_o_target, $(LGOBJS))
|
|
|
|
|
2003-03-27 21:09:35 +09:00
|
|
|
#########################################################################
|
|
|
|
|
2006-09-02 02:49:50 +09:00
|
|
|
# defines $(obj).depend target
|
|
|
|
include $(SRCTREE)/rules.mk
|
2003-03-27 21:09:35 +09:00
|
|
|
|
2006-09-02 02:49:50 +09:00
|
|
|
sinclude $(obj).depend
|
2003-03-27 21:09:35 +09:00
|
|
|
|
|
|
|
#########################################################################
|