xref: /openbmc/u-boot/drivers/mtd/spi/Makefile (revision 3765b3e7)
1#
2# (C) Copyright 2006
3# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4#
5# SPDX-License-Identifier:	GPL-2.0+
6#
7
8include $(TOPDIR)/config.mk
9
10LIB	:= $(obj)libspi_flash.o
11
12ifdef CONFIG_SPL_BUILD
13COBJS-$(CONFIG_SPL_SPI_LOAD)	+= spi_spl_load.o
14COBJS-$(CONFIG_SPL_SPI_BOOT)	+= fsl_espi_spl.o
15endif
16
17ifdef CONFIG_CMD_SF
18COBJS-y        += sf.o
19endif
20COBJS-$(CONFIG_SPI_FLASH) += sf_probe.o sf_ops.o
21COBJS-$(CONFIG_SPI_FRAM_RAMTRON) += ramtron.o
22COBJS-$(CONFIG_SPI_M95XXX) += eeprom_m95xxx.o
23
24COBJS	:= $(COBJS-y)
25SRCS	:= $(COBJS:.o=.c)
26OBJS	:= $(addprefix $(obj),$(COBJS))
27
28all:	$(LIB)
29
30$(LIB): $(obj).depend $(OBJS)
31	$(call cmd_link_o_target, $(OBJS))
32
33#########################################################################
34
35# defines $(obj).depend target
36include $(SRCTREE)/rules.mk
37
38sinclude $(obj).depend
39
40#########################################################################
41