Prabhakar Kushwaha | 7530d34 | 2012-04-24 20:17:15 +0000 | [diff] [blame] | 1 | # |
| 2 | # Copyright 2011-2012 Freescale Semiconductor, Inc. |
| 3 | # |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 4 | # SPDX-License-Identifier: GPL-2.0+ |
Prabhakar Kushwaha | 7530d34 | 2012-04-24 20:17:15 +0000 | [diff] [blame] | 5 | # |
| 6 | |
| 7 | include $(TOPDIR)/config.mk |
| 8 | |
| 9 | LIB = $(obj)lib$(BOARD).o |
| 10 | |
Prabhakar Kushwaha | f159326 | 2013-04-16 13:28:25 +0530 | [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 | |
Prabhakar Kushwaha | 7530d34 | 2012-04-24 20:17:15 +0000 | [diff] [blame] | 25 | COBJS-y += $(BOARD).o |
| 26 | COBJS-y += ddr.o |
| 27 | COBJS-y += law.o |
| 28 | COBJS-y += tlb.o |
| 29 | #COBJS-y += bsc9131rdb_mux.o |
| 30 | |
Prabhakar Kushwaha | f159326 | 2013-04-16 13:28:25 +0530 | [diff] [blame] | 31 | endif |
| 32 | |
Prabhakar Kushwaha | 7530d34 | 2012-04-24 20:17:15 +0000 | [diff] [blame] | 33 | SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) |
| 34 | OBJS := $(addprefix $(obj),$(COBJS-y)) |
| 35 | SOBJS := $(addprefix $(obj),$(SOBJS)) |
| 36 | |
| 37 | $(LIB): $(obj).depend $(OBJS) $(SOBJS) |
| 38 | $(call cmd_link_o_target, $(OBJS)) |
| 39 | |
| 40 | clean: |
| 41 | rm -f $(OBJS) $(SOBJS) |
| 42 | |
| 43 | distclean: clean |
| 44 | rm -f $(LIB) core *.bak .depend |
| 45 | |
| 46 | ######################################################################### |
| 47 | |
| 48 | # defines $(obj).depend target |
| 49 | include $(SRCTREE)/rules.mk |
| 50 | |
| 51 | sinclude $(obj).depend |
| 52 | |
| 53 | ######################################################################### |