Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 1 | # |
| 2 | # Copyright 2010-2011 Freescale Semiconductor, Inc. |
| 3 | # |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 4 | # SPDX-License-Identifier: GPL-2.0+ |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 5 | # |
| 6 | |
| 7 | include $(TOPDIR)/config.mk |
| 8 | |
| 9 | LIB = $(obj)lib$(BOARD).o |
| 10 | |
Scott Wood | c4f0d00 | 2012-09-20 19:05:12 -0500 | [diff] [blame] | 11 | MINIMAL= |
| 12 | |
| 13 | ifdef CONFIG_SPL_BUILD |
| 14 | ifdef CONFIG_SPL_INIT_MINIMAL |
| 15 | MINIMAL=y |
| 16 | endif |
| 17 | endif |
| 18 | |
| 19 | ifdef MINIMAL |
| 20 | |
| 21 | COBJS-y += spl_minimal.o tlb.o law.o |
| 22 | |
| 23 | else |
| 24 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 25 | COBJS-y += $(BOARD).o |
| 26 | COBJS-y += ddr.o |
| 27 | COBJS-y += law.o |
| 28 | COBJS-y += tlb.o |
| 29 | |
Scott Wood | c4f0d00 | 2012-09-20 19:05:12 -0500 | [diff] [blame] | 30 | endif |
| 31 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 32 | SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) |
| 33 | OBJS := $(addprefix $(obj),$(COBJS-y)) |
| 34 | SOBJS := $(addprefix $(obj),$(SOBJS)) |
| 35 | |
| 36 | $(LIB): $(obj).depend $(OBJS) $(SOBJS) |
| 37 | $(call cmd_link_o_target, $(OBJS)) |
| 38 | |
Li Yang | 5f99973 | 2011-07-26 09:50:46 -0500 | [diff] [blame] | 39 | ######################################################################### |
| 40 | |
| 41 | # defines $(obj).depend target |
| 42 | include $(SRCTREE)/rules.mk |
| 43 | |
| 44 | sinclude $(obj).depend |
| 45 | |
| 46 | ######################################################################### |