blob: 202b4a5ba0965f5aa806cd524d2dc38cfcb57d10 [file] [log] [blame]
Li Yang5f999732011-07-26 09:50:46 -05001#
2# Copyright 2010-2011 Freescale Semiconductor, Inc.
3#
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02004# SPDX-License-Identifier: GPL-2.0+
Li Yang5f999732011-07-26 09:50:46 -05005#
6
7include $(TOPDIR)/config.mk
8
9LIB = $(obj)lib$(BOARD).o
10
Scott Woodc4f0d002012-09-20 19:05:12 -050011MINIMAL=
12
13ifdef CONFIG_SPL_BUILD
14ifdef CONFIG_SPL_INIT_MINIMAL
15MINIMAL=y
16endif
17endif
18
19ifdef MINIMAL
20
21COBJS-y += spl_minimal.o tlb.o law.o
22
23else
Ying Zhang28027d72013-09-06 17:30:56 +080024ifdef CONFIG_SPL_BUILD
25COBJS-y += spl.o
26endif
Scott Woodc4f0d002012-09-20 19:05:12 -050027
Li Yang5f999732011-07-26 09:50:46 -050028COBJS-y += $(BOARD).o
29COBJS-y += ddr.o
30COBJS-y += law.o
31COBJS-y += tlb.o
32
Scott Woodc4f0d002012-09-20 19:05:12 -050033endif
34
Li Yang5f999732011-07-26 09:50:46 -050035SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
36OBJS := $(addprefix $(obj),$(COBJS-y))
37SOBJS := $(addprefix $(obj),$(SOBJS))
38
39$(LIB): $(obj).depend $(OBJS) $(SOBJS)
40 $(call cmd_link_o_target, $(OBJS))
41
Li Yang5f999732011-07-26 09:50:46 -050042#########################################################################
43
44# defines $(obj).depend target
45include $(SRCTREE)/rules.mk
46
47sinclude $(obj).depend
48
49#########################################################################