blob: 191138ad188edaca986b3c8feda9233b8b6c7c3f [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
Haavard Skinnemoen2f5bfb72008-05-16 11:10:33 +020017COBJS-$(CONFIG_SPI_FLASH) += spi_flash.o
18COBJS-$(CONFIG_SPI_FLASH_ATMEL) += atmel.o
Chong Huangc71e6dc2010-11-30 03:33:25 -050019COBJS-$(CONFIG_SPI_FLASH_EON) += eon.o
Rajeshwari Shinde22ea9342013-01-22 20:30:18 +000020COBJS-$(CONFIG_SPI_FLASH_GIGADEVICE) += gigadevice.o
Prafulla Wadaskar09569072009-04-06 21:24:43 +053021COBJS-$(CONFIG_SPI_FLASH_MACRONIX) += macronix.o
Mingkai Hu2ba690b2009-03-31 14:09:41 +080022COBJS-$(CONFIG_SPI_FLASH_SPANSION) += spansion.o
Mike Frysingerf1cb7c82009-03-27 19:27:58 -040023COBJS-$(CONFIG_SPI_FLASH_SST) += sst.o
TsiChung Liew8dd593a2008-08-06 16:08:41 -050024COBJS-$(CONFIG_SPI_FLASH_STMICRO) += stmicro.o
Jason McMullan64e5f3a2009-10-09 17:12:23 -040025COBJS-$(CONFIG_SPI_FLASH_WINBOND) += winbond.o
Reinhard Meyer52cb0a72010-10-05 16:56:40 +020026COBJS-$(CONFIG_SPI_FRAM_RAMTRON) += ramtron.o
Albin Tonnerre626e02a2009-08-07 12:37:36 +020027COBJS-$(CONFIG_SPI_M95XXX) += eeprom_m95xxx.o
Haavard Skinnemoen2f5bfb72008-05-16 11:10:33 +020028
29COBJS := $(COBJS-y)
30SRCS := $(COBJS:.o=.c)
31OBJS := $(addprefix $(obj),$(COBJS))
32
33all: $(LIB)
34
35$(LIB): $(obj).depend $(OBJS)
Sebastien Carliera8d426f2010-11-05 15:48:07 +010036 $(call cmd_link_o_target, $(OBJS))
Haavard Skinnemoen2f5bfb72008-05-16 11:10:33 +020037
38#########################################################################
39
40# defines $(obj).depend target
41include $(SRCTREE)/rules.mk
42
43sinclude $(obj).depend
44
45#########################################################################