Prabhakar Kushwaha | 41d9101 | 2013-01-14 18:26:57 +0000 | [diff] [blame] | 1 | # |
| 2 | # Copyright 2013 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 | 41d9101 | 2013-01-14 18:26:57 +0000 | [diff] [blame] | 5 | # |
| 6 | |
| 7 | include $(TOPDIR)/config.mk |
| 8 | |
| 9 | LIB = $(obj)lib$(BOARD).o |
| 10 | |
Prabhakar Kushwaha | 83e0c2b | 2013-04-16 13:28:40 +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 | |
| 25 | |
Prabhakar Kushwaha | 41d9101 | 2013-01-14 18:26:57 +0000 | [diff] [blame] | 26 | COBJS-y += $(BOARD).o |
| 27 | COBJS-y += ddr.o |
| 28 | COBJS-y += law.o |
| 29 | COBJS-y += tlb.o |
| 30 | |
Prabhakar Kushwaha | 83e0c2b | 2013-04-16 13:28:40 +0530 | [diff] [blame] | 31 | endif |
| 32 | |
Prabhakar Kushwaha | 41d9101 | 2013-01-14 18:26:57 +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 | ######################################################################### |