2007-05-13 11:58:00 +00:00
|
|
|
#
|
|
|
|
# Copyright (c) 2007
|
|
|
|
# Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
|
|
|
|
#
|
2013-07-08 07:37:19 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
2007-05-13 11:58:00 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/config.mk
|
|
|
|
|
2010-11-05 14:48:07 +00:00
|
|
|
LIB = $(obj)lib$(ARCH).o
|
2011-06-02 22:15:27 +00:00
|
|
|
LIBGCC = $(obj)libgcc.o
|
2007-05-13 11:58:00 +00:00
|
|
|
|
2008-02-27 10:00:47 +00:00
|
|
|
SOBJS-y +=
|
2011-06-02 22:15:27 +00:00
|
|
|
GLSOBJS += ashiftrt.o
|
|
|
|
GLSOBJS += ashiftlt.o
|
|
|
|
GLSOBJS += lshiftrt.o
|
|
|
|
GLSOBJS += ashldi3.o
|
2011-10-24 09:24:12 +00:00
|
|
|
GLSOBJS += ashrsi3.o
|
2011-06-02 22:15:27 +00:00
|
|
|
GLSOBJS += lshrdi3.o
|
|
|
|
GLSOBJS += movmem.o
|
2007-05-13 11:58:00 +00:00
|
|
|
|
2008-02-27 10:00:47 +00:00
|
|
|
COBJS-y += board.o
|
2013-06-26 13:55:16 +00:00
|
|
|
COBJS-$(CONFIG_CMD_BOOTM) += bootm.o
|
2008-11-20 07:44:42 +00:00
|
|
|
ifeq ($(CONFIG_SH2),y)
|
|
|
|
COBJS-y += time_sh2.o
|
|
|
|
else
|
|
|
|
COBJS-y += time.o
|
|
|
|
endif
|
2010-12-08 04:49:12 +00:00
|
|
|
ifeq ($(CONFIG_CMD_SH_ZIMAGEBOOT),y)
|
|
|
|
COBJS-y += zimageboot.o
|
|
|
|
endif
|
2007-05-13 11:58:00 +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))
|
2011-06-02 22:15:27 +00:00
|
|
|
LGOBJS := $(addprefix $(obj),$(GLSOBJS)) \
|
|
|
|
$(addprefix $(obj),$(GLCOBJS))
|
|
|
|
|
|
|
|
# Always build libsh.o
|
|
|
|
TARGETS := $(LIB)
|
|
|
|
|
|
|
|
# Build private libgcc only when asked for
|
|
|
|
ifdef USE_PRIVATE_LIBGCC
|
|
|
|
TARGETS += $(LIBGCC)
|
|
|
|
endif
|
|
|
|
|
|
|
|
all: $(TARGETS)
|
2007-05-13 11:58:00 +00:00
|
|
|
|
|
|
|
$(LIB): $(obj).depend $(OBJS)
|
2010-11-05 14:48:07 +00:00
|
|
|
$(call cmd_link_o_target, $(OBJS))
|
2007-05-13 11:58:00 +00:00
|
|
|
|
2011-06-02 22:15:27 +00:00
|
|
|
$(LIBGCC): $(obj).depend $(LGOBJS)
|
|
|
|
$(call cmd_link_o_target, $(LGOBJS))
|
|
|
|
|
2007-05-13 11:58:00 +00:00
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
# defines $(obj).depend target
|
|
|
|
include $(SRCTREE)/rules.mk
|
|
|
|
|
|
|
|
sinclude $(obj).depend
|
|
|
|
|
|
|
|
#########################################################################
|