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 | # |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame^] | 6 | # SPDX-License-Identifier: GPL-2.0+ |
Tom Rini | 47f7bca | 2012-08-13 12:03:19 -0700 | [diff] [blame] | 7 | # |
| 8 | # Based on common/Makefile. |
| 9 | # |
| 10 | |
| 11 | include $(TOPDIR)/config.mk |
| 12 | |
| 13 | LIB = $(obj)libspl.o |
| 14 | |
| 15 | ifdef CONFIG_SPL_BUILD |
| 16 | COBJS-$(CONFIG_SPL_FRAMEWORK) += spl.o |
Stefan Roese | 33d3464 | 2012-08-27 12:50:59 +0200 | [diff] [blame] | 17 | COBJS-$(CONFIG_SPL_NOR_SUPPORT) += spl_nor.o |
Tom Rini | 47f7bca | 2012-08-13 12:03:19 -0700 | [diff] [blame] | 18 | COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += spl_ymodem.o |
Tom Rini | d97b4ce | 2012-08-14 14:33:02 -0700 | [diff] [blame] | 19 | COBJS-$(CONFIG_SPL_NAND_SUPPORT) += spl_nand.o |
Enric Balletbo i Serra | 6000992 | 2013-02-07 23:14:48 +0000 | [diff] [blame] | 20 | COBJS-$(CONFIG_SPL_ONENAND_SUPPORT) += spl_onenand.o |
Ilya Yanok | 7ac2fe2 | 2012-09-18 00:22:50 +0000 | [diff] [blame] | 21 | COBJS-$(CONFIG_SPL_NET_SUPPORT) += spl_net.o |
Ying Zhang | ade8a1a | 2013-05-09 23:00:36 +0000 | [diff] [blame] | 22 | COBJS-$(CONFIG_SPL_MMC_SUPPORT) += spl_mmc.o |
Tom Rini | 47f7bca | 2012-08-13 12:03:19 -0700 | [diff] [blame] | 23 | endif |
| 24 | |
| 25 | COBJS := $(sort $(COBJS-y)) |
| 26 | SRCS := $(COBJS:.o=.c) |
| 27 | OBJS := $(addprefix $(obj),$(COBJS-y)) |
| 28 | |
| 29 | all: $(obj).depend $(LIB) |
| 30 | |
| 31 | $(LIB): $(OBJS) |
| 32 | $(call cmd_link_o_target, $(OBJS)) |
| 33 | |
| 34 | ######################################################################### |
| 35 | |
| 36 | # defines $(obj).depend target |
| 37 | include $(SRCTREE)/rules.mk |
| 38 | |
| 39 | sinclude $(obj).depend |
| 40 | |
| 41 | ######################################################################### |