Timur Tabi | c59e1b4 | 2010-06-14 15:28:24 -0500 | [diff] [blame] | 1 | # |
| 2 | # Copyright 2010 Freescale Semiconductor, Inc. |
| 3 | # |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 4 | # SPDX-License-Identifier: GPL-2.0+ |
Timur Tabi | c59e1b4 | 2010-06-14 15:28:24 -0500 | [diff] [blame] | 5 | # |
| 6 | |
| 7 | include $(TOPDIR)/config.mk |
| 8 | |
Sebastien Carlier | 6d8962e | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 9 | LIB = $(obj)lib$(BOARD).o |
Timur Tabi | c59e1b4 | 2010-06-14 15:28:24 -0500 | [diff] [blame] | 10 | |
Matthew McClintock | f45210d | 2013-02-18 10:02:19 +0000 | [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 |
Ying Zhang | 7c8eea5 | 2013-08-16 15:16:12 +0800 | [diff] [blame] | 24 | ifdef CONFIG_SPL_BUILD |
| 25 | COBJS-y += spl.o |
| 26 | endif |
Timur Tabi | c59e1b4 | 2010-06-14 15:28:24 -0500 | [diff] [blame] | 27 | COBJS-y += $(BOARD).o |
| 28 | COBJS-y += ddr.o |
| 29 | COBJS-y += law.o |
| 30 | COBJS-y += tlb.o |
| 31 | |
Timur Tabi | d5e01e4 | 2010-09-24 01:25:53 +0200 | [diff] [blame] | 32 | COBJS-$(CONFIG_FSL_DIU_FB) += diu.o |
Matthew McClintock | f45210d | 2013-02-18 10:02:19 +0000 | [diff] [blame] | 33 | endif |
Timur Tabi | d5e01e4 | 2010-09-24 01:25:53 +0200 | [diff] [blame] | 34 | |
Timur Tabi | c59e1b4 | 2010-06-14 15:28:24 -0500 | [diff] [blame] | 35 | SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) |
| 36 | OBJS := $(addprefix $(obj),$(COBJS-y)) |
| 37 | SOBJS := $(addprefix $(obj),$(SOBJS)) |
| 38 | |
| 39 | $(LIB): $(obj).depend $(OBJS) $(SOBJS) |
Sebastien Carlier | 6d8962e | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 40 | $(call cmd_link_o_target, $(OBJS)) |
Timur Tabi | c59e1b4 | 2010-06-14 15:28:24 -0500 | [diff] [blame] | 41 | |
Timur Tabi | c59e1b4 | 2010-06-14 15:28:24 -0500 | [diff] [blame] | 42 | ######################################################################### |
| 43 | |
| 44 | # defines $(obj).depend target |
| 45 | include $(SRCTREE)/rules.mk |
| 46 | |
| 47 | sinclude $(obj).depend |
| 48 | |
| 49 | ######################################################################### |