Merge branch 'master' of git://www.denx.de/git/u-boot-cfi-flash
[platform/kernel/u-boot.git] / drivers / mtd / spi / Makefile
1 #
2 # (C) Copyright 2006
3 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 #
5 # SPDX-License-Identifier:      GPL-2.0+
6 #
7
8 include $(TOPDIR)/config.mk
9
10 LIB     := $(obj)libspi_flash.o
11
12 ifdef CONFIG_SPL_BUILD
13 COBJS-$(CONFIG_SPL_SPI_LOAD)    += spi_spl_load.o
14 endif
15
16 COBJS-$(CONFIG_SPI_FLASH)       += spi_flash.o
17 COBJS-$(CONFIG_SPI_FLASH_ATMEL) += atmel.o
18 COBJS-$(CONFIG_SPI_FLASH_EON)   += eon.o
19 COBJS-$(CONFIG_SPI_FLASH_GIGADEVICE)    += gigadevice.o
20 COBJS-$(CONFIG_SPI_FLASH_MACRONIX)      += macronix.o
21 COBJS-$(CONFIG_SPI_FLASH_SPANSION)      += spansion.o
22 COBJS-$(CONFIG_SPI_FLASH_SST)   += sst.o
23 COBJS-$(CONFIG_SPI_FLASH_STMICRO)       += stmicro.o
24 COBJS-$(CONFIG_SPI_FLASH_WINBOND)       += winbond.o
25 COBJS-$(CONFIG_SPI_FRAM_RAMTRON)        += ramtron.o
26 COBJS-$(CONFIG_SPI_M95XXX) += eeprom_m95xxx.o
27
28 COBJS   := $(COBJS-y)
29 SRCS    := $(COBJS:.o=.c)
30 OBJS    := $(addprefix $(obj),$(COBJS))
31
32 all:    $(LIB)
33
34 $(LIB): $(obj).depend $(OBJS)
35         $(call cmd_link_o_target, $(OBJS))
36
37 #########################################################################
38
39 # defines $(obj).depend target
40 include $(SRCTREE)/rules.mk
41
42 sinclude $(obj).depend
43
44 #########################################################################