xref: /openbmc/u-boot/common/spl/Makefile (revision c0dcece7)
1#
2# (C) Copyright 2012
3# Texas Instruments Incorporated - http://www.ti.com/
4# Aneesh V <aneesh@ti.com>
5#
6# SPDX-License-Identifier:	GPL-2.0+
7#
8# Based on common/Makefile.
9#
10
11include $(TOPDIR)/config.mk
12
13LIB	= $(obj)libspl.o
14
15ifdef CONFIG_SPL_BUILD
16COBJS-$(CONFIG_SPL_FRAMEWORK) += spl.o
17COBJS-$(CONFIG_SPL_NOR_SUPPORT) += spl_nor.o
18COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += spl_ymodem.o
19COBJS-$(CONFIG_SPL_NAND_SUPPORT) += spl_nand.o
20COBJS-$(CONFIG_SPL_ONENAND_SUPPORT) += spl_onenand.o
21COBJS-$(CONFIG_SPL_NET_SUPPORT) += spl_net.o
22COBJS-$(CONFIG_SPL_MMC_SUPPORT) += spl_mmc.o
23endif
24
25COBJS	:= $(sort $(COBJS-y))
26SRCS	:= $(COBJS:.o=.c)
27OBJS	:= $(addprefix $(obj),$(COBJS-y))
28
29all:	$(obj).depend $(LIB)
30
31$(LIB):	$(OBJS)
32	$(call cmd_link_o_target, $(OBJS))
33
34#########################################################################
35
36# defines $(obj).depend target
37include $(SRCTREE)/rules.mk
38
39sinclude $(obj).depend
40
41#########################################################################
42