Tom Rini | 47f7bca | 2012-08-13 12:03:19 -0700 | [diff] [blame] | 1 | # |
| 2 | # (C) Copyright 2012 |
| 3 | # Texas Instruments Incorporated - http://www.ti.com/ |
| 4 | # Aneesh V <aneesh@ti.com> |
| 5 | # |
| 6 | # This file is released under the terms of GPL v2 and any later version. |
| 7 | # See the file COPYING in the root directory of the source tree for details. |
| 8 | # |
| 9 | # Based on common/Makefile. |
| 10 | # |
| 11 | |
| 12 | include $(TOPDIR)/config.mk |
| 13 | |
| 14 | LIB = $(obj)libspl.o |
| 15 | |
| 16 | ifdef CONFIG_SPL_BUILD |
| 17 | COBJS-$(CONFIG_SPL_FRAMEWORK) += spl.o |
Stefan Roese | 33d3464 | 2012-08-27 12:50:59 +0200 | [diff] [blame] | 18 | COBJS-$(CONFIG_SPL_NOR_SUPPORT) += spl_nor.o |
Tom Rini | 47f7bca | 2012-08-13 12:03:19 -0700 | [diff] [blame] | 19 | COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += spl_ymodem.o |
Tom Rini | d97b4ce | 2012-08-14 14:33:02 -0700 | [diff] [blame] | 20 | COBJS-$(CONFIG_SPL_NAND_SUPPORT) += spl_nand.o |
Ilya Yanok | 7ac2fe2 | 2012-09-18 00:22:50 +0000 | [diff] [blame] | 21 | COBJS-$(CONFIG_SPL_NET_SUPPORT) += spl_net.o |
Tom Rini | 47f7bca | 2012-08-13 12:03:19 -0700 | [diff] [blame] | 22 | endif |
| 23 | |
| 24 | COBJS := $(sort $(COBJS-y)) |
| 25 | SRCS := $(COBJS:.o=.c) |
| 26 | OBJS := $(addprefix $(obj),$(COBJS-y)) |
| 27 | |
| 28 | all: $(obj).depend $(LIB) |
| 29 | |
| 30 | $(LIB): $(OBJS) |
| 31 | $(call cmd_link_o_target, $(OBJS)) |
| 32 | |
| 33 | ######################################################################### |
| 34 | |
| 35 | # defines $(obj).depend target |
| 36 | include $(SRCTREE)/rules.mk |
| 37 | |
| 38 | sinclude $(obj).depend |
| 39 | |
| 40 | ######################################################################### |