blob: 56781345b37ec5c6ed0a1e4fa1787fcdf9a1688c [file] [log] [blame]
Haavard Skinnemoend25ce7d2008-05-16 11:10:33 +02001#
2# (C) Copyright 2006
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
Wolfgang Denk1a459662013-07-08 09:37:19 +02005# SPDX-License-Identifier: GPL-2.0+
Haavard Skinnemoend25ce7d2008-05-16 11:10:33 +02006#
7
8include $(TOPDIR)/config.mk
9
Sebastien Carlier6d8962e2010-11-05 15:48:07 +010010LIB := $(obj)libspi_flash.o
Haavard Skinnemoend25ce7d2008-05-16 11:10:33 +020011
Christian Riesch32b11272011-12-09 09:47:35 +000012ifdef CONFIG_SPL_BUILD
13COBJS-$(CONFIG_SPL_SPI_LOAD) += spi_spl_load.o
Ying Zhangfdf85292013-08-16 15:16:13 +080014COBJS-$(CONFIG_SPL_SPI_BOOT) += fsl_espi_spl.o
Christian Riesch32b11272011-12-09 09:47:35 +000015endif
16
Jagannadha Sutradharudu Tekiaf1679b2013-09-24 16:03:45 +053017ifdef CONFIG_CMD_SF
18COBJS-y += spi_flash.o
19endif
20COBJS-$(CONFIG_SPI_FLASH) += spi_flash_probe.o spi_flash_ops.o
Reinhard Meyere0987e22010-10-05 16:56:40 +020021COBJS-$(CONFIG_SPI_FRAM_RAMTRON) += ramtron.o
Albin Tonnerre3ac374c2009-08-07 12:37:36 +020022COBJS-$(CONFIG_SPI_M95XXX) += eeprom_m95xxx.o
Haavard Skinnemoend25ce7d2008-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 Carlier6d8962e2010-11-05 15:48:07 +010031 $(call cmd_link_o_target, $(OBJS))
Haavard Skinnemoend25ce7d2008-05-16 11:10:33 +020032
33#########################################################################
34
35# defines $(obj).depend target
36include $(SRCTREE)/rules.mk
37
38sinclude $(obj).depend
39
40#########################################################################