1#
2# Copyright 2013 Freescale Semiconductor, Inc.
3#
4# SPDX-License-Identifier:	GPL-2.0+
5#
6
7include $(TOPDIR)/config.mk
8
9LIB	= $(obj)lib$(BOARD).o
10
11MINIMAL=
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
26COBJS-y	+= $(BOARD).o
27COBJS-y	+= ddr.o
28COBJS-y	+= law.o
29COBJS-y	+= tlb.o
30
31endif
32
33SRCS	:= $(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#########################################################################
54