Haavard Skinnemoen | 2f5bfb7 | 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 | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | # SPDX-License-Identifier: GPL-2.0+ |
Haavard Skinnemoen | 2f5bfb7 | 2008-05-16 11:10:33 +0200 | [diff] [blame] | 6 | # |
| 7 | |
| 8 | include $(TOPDIR)/config.mk |
| 9 | |
Sebastien Carlier | a8d426f | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 10 | LIB := $(obj)libspi_flash.o |
Haavard Skinnemoen | 2f5bfb7 | 2008-05-16 11:10:33 +0200 | [diff] [blame] | 11 | |
Christian Riesch | 23f16a8 | 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 | ded0f0f | 2013-08-16 15:16:13 +0800 | [diff] [blame] | 14 | COBJS-$(CONFIG_SPL_SPI_BOOT) += fsl_espi_spl.o |
Christian Riesch | 23f16a8 | 2011-12-09 09:47:35 +0000 | [diff] [blame] | 15 | endif |
| 16 | |
Jagannadha Sutradharudu Teki | fcc9f34 | 2013-09-24 16:03:45 +0530 | [diff] [blame] | 17 | ifdef CONFIG_CMD_SF |
Jagannadha Sutradharudu Teki | ac8242d | 2013-09-26 16:00:15 +0530 | [diff] [blame] | 18 | COBJS-y += sf.o |
Jagannadha Sutradharudu Teki | fcc9f34 | 2013-09-24 16:03:45 +0530 | [diff] [blame] | 19 | endif |
Jagannadha Sutradharudu Teki | ac8242d | 2013-09-26 16:00:15 +0530 | [diff] [blame] | 20 | COBJS-$(CONFIG_SPI_FLASH) += sf_probe.o sf_ops.o |
Jagannadha Sutradharudu Teki | 25dc86a | 2013-10-02 19:38:49 +0530 | [diff] [blame] | 21 | COBJS-$(CONFIG_SPI_FRAM_RAMTRON) += ramtron.o |
Albin Tonnerre | 626e02a | 2009-08-07 12:37:36 +0200 | [diff] [blame] | 22 | COBJS-$(CONFIG_SPI_M95XXX) += eeprom_m95xxx.o |
Haavard Skinnemoen | 2f5bfb7 | 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 | a8d426f | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 31 | $(call cmd_link_o_target, $(OBJS)) |
Haavard Skinnemoen | 2f5bfb7 | 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 | ######################################################################### |