blob: 86ffc59d039ecb040eab8c2a2a770c4571cb30f7 [file] [log] [blame]
Haavard Skinnemoen2f5bfb72008-05-16 11:10:33 +02001#
2# (C) Copyright 2006
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005# SPDX-License-Identifier: GPL-2.0+
Haavard Skinnemoen2f5bfb72008-05-16 11:10:33 +02006#
7
8include $(TOPDIR)/config.mk
9
Sebastien Carliera8d426f2010-11-05 15:48:07 +010010LIB := $(obj)libspi_flash.o
Haavard Skinnemoen2f5bfb72008-05-16 11:10:33 +020011
Christian Riesch23f16a82011-12-09 09:47:35 +000012ifdef CONFIG_SPL_BUILD
13COBJS-$(CONFIG_SPL_SPI_LOAD) += spi_spl_load.o
Ying Zhangded0f0f2013-08-16 15:16:13 +080014COBJS-$(CONFIG_SPL_SPI_BOOT) += fsl_espi_spl.o
Christian Riesch23f16a82011-12-09 09:47:35 +000015endif
16
Jagannadha Sutradharudu Tekifcc9f342013-09-24 16:03:45 +053017ifdef CONFIG_CMD_SF
Jagannadha Sutradharudu Tekiac8242d2013-09-26 16:00:15 +053018COBJS-y += sf.o
Jagannadha Sutradharudu Tekifcc9f342013-09-24 16:03:45 +053019endif
Jagannadha Sutradharudu Tekiac8242d2013-09-26 16:00:15 +053020COBJS-$(CONFIG_SPI_FLASH) += sf_probe.o sf_ops.o
Jagannadha Sutradharudu Teki25dc86a2013-10-02 19:38:49 +053021COBJS-$(CONFIG_SPI_FRAM_RAMTRON) += ramtron.o
Albin Tonnerre626e02a2009-08-07 12:37:36 +020022COBJS-$(CONFIG_SPI_M95XXX) += eeprom_m95xxx.o
Haavard Skinnemoen2f5bfb72008-05-16 11:10:33 +020023
24COBJS := $(COBJS-y)
25SRCS := $(COBJS:.o=.c)
26OBJS := $(addprefix $(obj),$(COBJS))
27
28all: $(LIB)
29
30$(LIB): $(obj).depend $(OBJS)
Sebastien Carliera8d426f2010-11-05 15:48:07 +010031 $(call cmd_link_o_target, $(OBJS))
Haavard Skinnemoen2f5bfb72008-05-16 11:10:33 +020032
33#########################################################################
34
35# defines $(obj).depend target
36include $(SRCTREE)/rules.mk
37
38sinclude $(obj).depend
39
40#########################################################################