Haavard Skinnemoen | d25ce7d | 2008-05-16 11:10:33 +0200 | [diff] [blame] | 1 | # |
| 2 | # (C) Copyright 2006 |
| 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | # |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | # SPDX-License-Identifier: GPL-2.0+ |
Haavard Skinnemoen | d25ce7d | 2008-05-16 11:10:33 +0200 | [diff] [blame] | 6 | # |
| 7 | |
| 8 | include $(TOPDIR)/config.mk |
| 9 | |
Sebastien Carlier | 6d8962e | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 10 | LIB := $(obj)libspi_flash.o |
Haavard Skinnemoen | d25ce7d | 2008-05-16 11:10:33 +0200 | [diff] [blame] | 11 | |
Christian Riesch | 32b1127 | 2011-12-09 09:47:35 +0000 | [diff] [blame] | 12 | ifdef CONFIG_SPL_BUILD |
| 13 | COBJS-$(CONFIG_SPL_SPI_LOAD) += spi_spl_load.o |
Ying Zhang | fdf8529 | 2013-08-16 15:16:13 +0800 | [diff] [blame] | 14 | COBJS-$(CONFIG_SPL_SPI_BOOT) += fsl_espi_spl.o |
Christian Riesch | 32b1127 | 2011-12-09 09:47:35 +0000 | [diff] [blame] | 15 | endif |
| 16 | |
Jagannadha Sutradharudu Teki | af1679b | 2013-09-24 16:03:45 +0530 | [diff] [blame] | 17 | ifdef CONFIG_CMD_SF |
| 18 | COBJS-y += spi_flash.o |
| 19 | endif |
| 20 | COBJS-$(CONFIG_SPI_FLASH) += spi_flash_probe.o spi_flash_ops.o |
Reinhard Meyer | e0987e2 | 2010-10-05 16:56:40 +0200 | [diff] [blame] | 21 | COBJS-$(CONFIG_SPI_FRAM_RAMTRON) += ramtron.o |
Albin Tonnerre | 3ac374c | 2009-08-07 12:37:36 +0200 | [diff] [blame] | 22 | COBJS-$(CONFIG_SPI_M95XXX) += eeprom_m95xxx.o |
Haavard Skinnemoen | d25ce7d | 2008-05-16 11:10:33 +0200 | [diff] [blame] | 23 | |
| 24 | COBJS := $(COBJS-y) |
| 25 | SRCS := $(COBJS:.o=.c) |
| 26 | OBJS := $(addprefix $(obj),$(COBJS)) |
| 27 | |
| 28 | all: $(LIB) |
| 29 | |
| 30 | $(LIB): $(obj).depend $(OBJS) |
Sebastien Carlier | 6d8962e | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 31 | $(call cmd_link_o_target, $(OBJS)) |
Haavard Skinnemoen | d25ce7d | 2008-05-16 11:10:33 +0200 | [diff] [blame] | 32 | |
| 33 | ######################################################################### |
| 34 | |
| 35 | # defines $(obj).depend target |
| 36 | include $(SRCTREE)/rules.mk |
| 37 | |
| 38 | sinclude $(obj).depend |
| 39 | |
| 40 | ######################################################################### |