Chander Kashyap | b9a1ef2 | 2011-08-18 22:37:19 +0000 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2011 Samsung Electronics |
| 3 | # |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame^] | 4 | # SPDX-License-Identifier: GPL-2.0+ |
Chander Kashyap | b9a1ef2 | 2011-08-18 22:37:19 +0000 | [diff] [blame] | 5 | # |
| 6 | |
| 7 | include $(TOPDIR)/config.mk |
| 8 | |
| 9 | LIB = $(obj)lib$(BOARD).o |
| 10 | |
Chander Kashyap | 98a48c5 | 2011-08-18 22:37:20 +0000 | [diff] [blame] | 11 | ifndef CONFIG_SPL_BUILD |
Chander Kashyap | b9a1ef2 | 2011-08-18 22:37:19 +0000 | [diff] [blame] | 12 | COBJS += origen.o |
Chander Kashyap | 98a48c5 | 2011-08-18 22:37:20 +0000 | [diff] [blame] | 13 | endif |
| 14 | |
Rajeshwari Shinde | 643be9c | 2013-07-04 12:29:17 +0530 | [diff] [blame] | 15 | SRCS := $(COBJS:.o=.c) |
| 16 | OBJS := $(addprefix $(obj),$(COBJS)) |
Chander Kashyap | b9a1ef2 | 2011-08-18 22:37:19 +0000 | [diff] [blame] | 17 | |
Chander Kashyap | 98a48c5 | 2011-08-18 22:37:20 +0000 | [diff] [blame] | 18 | ALL +=$(obj).depend $(LIB) |
| 19 | |
| 20 | ifdef CONFIG_SPL_BUILD |
Angus Ainslie | a2ee7f0 | 2011-09-12 10:11:58 +0000 | [diff] [blame] | 21 | ALL += $(OBJTREE)/tools/mk$(BOARD)spl |
Chander Kashyap | 98a48c5 | 2011-08-18 22:37:20 +0000 | [diff] [blame] | 22 | endif |
| 23 | |
| 24 | all: $(ALL) |
Chander Kashyap | b9a1ef2 | 2011-08-18 22:37:19 +0000 | [diff] [blame] | 25 | |
| 26 | $(LIB): $(OBJS) |
Mike Frysinger | 26ddff2 | 2011-10-18 05:30:17 +0000 | [diff] [blame] | 27 | $(call cmd_link_o_target, $(OBJS)) |
Chander Kashyap | b9a1ef2 | 2011-08-18 22:37:19 +0000 | [diff] [blame] | 28 | |
Chander Kashyap | 98a48c5 | 2011-08-18 22:37:20 +0000 | [diff] [blame] | 29 | ifdef CONFIG_SPL_BUILD |
Angus Ainslie | a2ee7f0 | 2011-09-12 10:11:58 +0000 | [diff] [blame] | 30 | $(OBJTREE)/tools/mk$(BOARD)spl: tools/mkv310_image.c |
| 31 | $(HOSTCC) tools/mkv310_image.c -o $(OBJTREE)/tools/mk$(BOARD)spl |
Chander Kashyap | 98a48c5 | 2011-08-18 22:37:20 +0000 | [diff] [blame] | 32 | endif |
| 33 | |
Chander Kashyap | b9a1ef2 | 2011-08-18 22:37:19 +0000 | [diff] [blame] | 34 | ######################################################################### |
| 35 | |
| 36 | # defines $(obj).depend target |
| 37 | include $(SRCTREE)/rules.mk |
| 38 | |
| 39 | sinclude $(obj).depend |
| 40 | |
| 41 | ######################################################################### |