Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 1 | # |
Jean-Christophe PLAGNIOL-VILLARD | 59829cc | 2007-11-24 21:26:56 +0100 | [diff] [blame] | 2 | # (C) Copyright 2000-2007 |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 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+ |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 6 | # |
| 7 | |
Bartlomiej Sieka | addb2e1 | 2006-03-05 18:57:33 +0100 | [diff] [blame] | 8 | include $(TOPDIR)/config.mk |
| 9 | |
Sebastien Carlier | 6d8962e | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 10 | LIB := $(obj)libmtd.o |
Bartlomiej Sieka | addb2e1 | 2006-03-05 18:57:33 +0100 | [diff] [blame] | 11 | |
Sergey Lapin | dfe64e2 | 2013-01-14 03:46:50 +0000 | [diff] [blame] | 12 | ifneq (,$(findstring y,$(CONFIG_MTD_DEVICE)$(CONFIG_CMD_NAND)$(CONFIG_CMD_ONENAND))) |
| 13 | COBJS-y += mtdcore.o |
| 14 | endif |
Stefan Roese | d558107 | 2009-05-12 14:31:18 +0200 | [diff] [blame] | 15 | COBJS-$(CONFIG_MTD_PARTITIONS) += mtdpart.o |
Stefan Roese | 0a57265 | 2009-05-12 14:29:39 +0200 | [diff] [blame] | 16 | COBJS-$(CONFIG_MTD_CONCAT) += mtdconcat.o |
Jean-Christophe PLAGNIOL-VILLARD | 00b1883 | 2008-08-13 01:40:42 +0200 | [diff] [blame] | 17 | COBJS-$(CONFIG_HAS_DATAFLASH) += at45.o |
| 18 | COBJS-$(CONFIG_FLASH_CFI_DRIVER) += cfi_flash.o |
Piotr Ziecik | 91809ed | 2008-11-17 15:57:58 +0100 | [diff] [blame] | 19 | COBJS-$(CONFIG_FLASH_CFI_MTD) += cfi_mtd.o |
Jean-Christophe PLAGNIOL-VILLARD | b5873f1 | 2008-04-01 07:30:51 +0200 | [diff] [blame] | 20 | COBJS-$(CONFIG_HAS_DATAFLASH) += dataflash.o |
Macpaul Lin | 00d10eb | 2011-04-15 21:37:11 +0000 | [diff] [blame] | 21 | COBJS-$(CONFIG_FTSMC020) += ftsmc020.o |
Michael Schwingen | 81b20cc | 2007-12-07 23:35:02 +0100 | [diff] [blame] | 22 | COBJS-$(CONFIG_FLASH_CFI_LEGACY) += jedec_flash.o |
Jean-Christophe PLAGNIOL-VILLARD | 00b1883 | 2008-08-13 01:40:42 +0200 | [diff] [blame] | 23 | COBJS-$(CONFIG_MW_EEPROM) += mw_eeprom.o |
Vipin KUMAR | f3fcf92 | 2012-05-07 13:00:19 +0530 | [diff] [blame] | 24 | COBJS-$(CONFIG_ST_SMI) += st_smi.o |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 25 | |
Jean-Christophe PLAGNIOL-VILLARD | 59829cc | 2007-11-24 21:26:56 +0100 | [diff] [blame] | 26 | COBJS := $(COBJS-y) |
Jean-Christophe PLAGNIOL-VILLARD | b5873f1 | 2008-04-01 07:30:51 +0200 | [diff] [blame] | 27 | SRCS := $(COBJS:.o=.c) |
| 28 | OBJS := $(addprefix $(obj),$(COBJS)) |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 29 | |
Bartlomiej Sieka | addb2e1 | 2006-03-05 18:57:33 +0100 | [diff] [blame] | 30 | all: $(LIB) |
| 31 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 32 | $(LIB): $(obj).depend $(OBJS) |
Sebastien Carlier | 6d8962e | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 33 | $(call cmd_link_o_target, $(OBJS)) |
Bartlomiej Sieka | addb2e1 | 2006-03-05 18:57:33 +0100 | [diff] [blame] | 34 | |
| 35 | ######################################################################### |
| 36 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 37 | # defines $(obj).depend target |
| 38 | include $(SRCTREE)/rules.mk |
Bartlomiej Sieka | addb2e1 | 2006-03-05 18:57:33 +0100 | [diff] [blame] | 39 | |
Marian Balakowicz | f932863 | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 40 | sinclude $(obj).depend |
| 41 | |
| 42 | ######################################################################### |