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