Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 1 | # |
Jean-Christophe PLAGNIOL-VILLARD | 82ca974 | 2007-11-24 21:26:56 +0100 | [diff] [blame] | 2 | # (C) Copyright 2000-2007 |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 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+ |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 6 | # |
| 7 | |
Bartlomiej Sieka | 582f1a3 | 2006-03-05 18:57:33 +0100 | [diff] [blame] | 8 | include $(TOPDIR)/config.mk |
| 9 | |
Sebastien Carlier | a8d426f | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 10 | LIB := $(obj)libmtd.o |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 11 | |
Sergey Lapin | 3a38a55 | 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 | 22ce6f9 | 2009-05-12 14:31:18 +0200 | [diff] [blame] | 15 | COBJS-$(CONFIG_MTD_PARTITIONS) += mtdpart.o |
Stefan Roese | e0860d4 | 2009-05-12 14:29:39 +0200 | [diff] [blame] | 16 | COBJS-$(CONFIG_MTD_CONCAT) += mtdconcat.o |
Jean-Christophe PLAGNIOL-VILLARD | 8d94c23 | 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 | 3e939e9 | 2008-11-17 15:57:58 +0100 | [diff] [blame] | 19 | COBJS-$(CONFIG_FLASH_CFI_MTD) += cfi_mtd.o |
Jean-Christophe PLAGNIOL-VILLARD | c38ce73 | 2008-04-01 07:30:51 +0200 | [diff] [blame] | 20 | COBJS-$(CONFIG_HAS_DATAFLASH) += dataflash.o |
Macpaul Lin | d204d62 | 2011-04-15 21:37:11 +0000 | [diff] [blame] | 21 | COBJS-$(CONFIG_FTSMC020) += ftsmc020.o |
Michael Schwingen | 73d044d | 2007-12-07 23:35:02 +0100 | [diff] [blame] | 22 | COBJS-$(CONFIG_FLASH_CFI_LEGACY) += jedec_flash.o |
Jean-Christophe PLAGNIOL-VILLARD | 8d94c23 | 2008-08-13 01:40:42 +0200 | [diff] [blame] | 23 | COBJS-$(CONFIG_MW_EEPROM) += mw_eeprom.o |
Vipin KUMAR | c0f9f27 | 2012-05-07 13:00:19 +0530 | [diff] [blame] | 24 | COBJS-$(CONFIG_ST_SMI) += st_smi.o |
Bartlomiej Sieka | 582f1a3 | 2006-03-05 18:57:33 +0100 | [diff] [blame] | 25 | |
Jean-Christophe PLAGNIOL-VILLARD | 82ca974 | 2007-11-24 21:26:56 +0100 | [diff] [blame] | 26 | COBJS := $(COBJS-y) |
Jean-Christophe PLAGNIOL-VILLARD | c38ce73 | 2008-04-01 07:30:51 +0200 | [diff] [blame] | 27 | SRCS := $(COBJS:.o=.c) |
| 28 | OBJS := $(addprefix $(obj),$(COBJS)) |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 29 | |
Bartlomiej Sieka | 582f1a3 | 2006-03-05 18:57:33 +0100 | [diff] [blame] | 30 | all: $(LIB) |
| 31 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 32 | $(LIB): $(obj).depend $(OBJS) |
Sebastien Carlier | a8d426f | 2010-11-05 15:48:07 +0100 | [diff] [blame] | 33 | $(call cmd_link_o_target, $(OBJS)) |
Bartlomiej Sieka | 582f1a3 | 2006-03-05 18:57:33 +0100 | [diff] [blame] | 34 | |
| 35 | ######################################################################### |
| 36 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 37 | # defines $(obj).depend target |
| 38 | include $(SRCTREE)/rules.mk |
Bartlomiej Sieka | 582f1a3 | 2006-03-05 18:57:33 +0100 | [diff] [blame] | 39 | |
Marian Balakowicz | d62379d | 2006-09-01 19:49:50 +0200 | [diff] [blame] | 40 | sinclude $(obj).depend |
| 41 | |
| 42 | ######################################################################### |