blob: 330d35333ee4f9a483a80eca2ff74888f183f86f [file] [log] [blame]
Prabhakar Kushwaha41d91012013-01-14 18:26:57 +00001#
2# Copyright 2013 Freescale Semiconductor, Inc.
3#
Wolfgang Denk1a459662013-07-08 09:37:19 +02004# SPDX-License-Identifier: GPL-2.0+
Prabhakar Kushwaha41d91012013-01-14 18:26:57 +00005#
6
7include $(TOPDIR)/config.mk
8
9LIB = $(obj)lib$(BOARD).o
10
Prabhakar Kushwaha83e0c2b2013-04-16 13:28:40 +053011MINIMAL=
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
24
25
Prabhakar Kushwaha41d91012013-01-14 18:26:57 +000026COBJS-y += $(BOARD).o
27COBJS-y += ddr.o
28COBJS-y += law.o
29COBJS-y += tlb.o
30
Prabhakar Kushwaha83e0c2b2013-04-16 13:28:40 +053031endif
32
Prabhakar Kushwaha41d91012013-01-14 18:26:57 +000033SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
34OBJS := $(addprefix $(obj),$(COBJS-y))
35SOBJS := $(addprefix $(obj),$(SOBJS))
36
37$(LIB): $(obj).depend $(OBJS) $(SOBJS)
38 $(call cmd_link_o_target, $(OBJS))
39
40clean:
41 rm -f $(OBJS) $(SOBJS)
42
43distclean: clean
44 rm -f $(LIB) core *.bak .depend
45
46#########################################################################
47
48# defines $(obj).depend target
49include $(SRCTREE)/rules.mk
50
51sinclude $(obj).depend
52
53#########################################################################