xref: /openbmc/u-boot/drivers/mtd/nand/Makefile (revision 7d0d355f)
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)libnand.o
11
12ifdef CONFIG_CMD_NAND
13
14ifdef CONFIG_SPL_BUILD
15
16ifdef CONFIG_SPL_NAND_DRIVERS
17NORMAL_DRIVERS=y
18endif
19
20COBJS-$(CONFIG_SPL_NAND_AM33XX_BCH) += am335x_spl_bch.o
21COBJS-$(CONFIG_SPL_NAND_DOCG4) += docg4_spl.o
22COBJS-$(CONFIG_SPL_NAND_SIMPLE) += nand_spl_simple.o
23COBJS-$(CONFIG_SPL_NAND_LOAD) += nand_spl_load.o
24COBJS-$(CONFIG_SPL_NAND_ECC) += nand_ecc.o
25COBJS-$(CONFIG_SPL_NAND_BASE) += nand_base.o
26COBJS-$(CONFIG_SPL_NAND_INIT) += nand.o
27
28else # not spl
29
30NORMAL_DRIVERS=y
31
32COBJS-y += nand.o
33COBJS-y += nand_bbt.o
34COBJS-y += nand_ids.o
35COBJS-y += nand_util.o
36COBJS-y += nand_ecc.o
37COBJS-y += nand_base.o
38
39endif # not spl
40
41ifdef NORMAL_DRIVERS
42
43COBJS-$(CONFIG_NAND_ECC_BCH) += nand_bch.o
44
45COBJS-$(CONFIG_NAND_ATMEL) += atmel_nand.o
46COBJS-$(CONFIG_DRIVER_NAND_BFIN) += bfin_nand.o
47COBJS-$(CONFIG_NAND_DAVINCI) += davinci_nand.o
48COBJS-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o
49COBJS-$(CONFIG_NAND_FSL_IFC) += fsl_ifc_nand.o
50COBJS-$(CONFIG_NAND_FSL_UPM) += fsl_upm.o
51COBJS-$(CONFIG_NAND_FSMC) += fsmc_nand.o
52COBJS-$(CONFIG_NAND_JZ4740) += jz4740_nand.o
53COBJS-$(CONFIG_NAND_KB9202) += kb9202_nand.o
54COBJS-$(CONFIG_NAND_KIRKWOOD) += kirkwood_nand.o
55COBJS-$(CONFIG_NAND_KMETER1) += kmeter1_nand.o
56COBJS-$(CONFIG_NAND_MPC5121_NFC) += mpc5121_nfc.o
57COBJS-$(CONFIG_NAND_MXC) += mxc_nand.o
58COBJS-$(CONFIG_NAND_MXS) += mxs_nand.o
59COBJS-$(CONFIG_NAND_NDFC) += ndfc.o
60COBJS-$(CONFIG_NAND_NOMADIK) += nomadik.o
61COBJS-$(CONFIG_NAND_S3C2410) += s3c2410_nand.o
62COBJS-$(CONFIG_NAND_SPEAR) += spr_nand.o
63COBJS-$(CONFIG_TEGRA_NAND) += tegra_nand.o
64COBJS-$(CONFIG_NAND_OMAP_GPMC) += omap_gpmc.o
65COBJS-$(CONFIG_NAND_PLAT) += nand_plat.o
66COBJS-$(CONFIG_NAND_DOCG4) += docg4.o
67
68else  # minimal SPL drivers
69
70COBJS-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_spl.o
71COBJS-$(CONFIG_NAND_FSL_IFC) += fsl_ifc_spl.o
72COBJS-$(CONFIG_NAND_MXC) += mxc_nand_spl.o
73
74endif # drivers
75endif # nand
76
77COBJS	:= $(COBJS-y)
78SRCS	:= $(COBJS:.o=.c)
79OBJS	:= $(addprefix $(obj),$(COBJS))
80
81all:	$(LIB)
82
83$(LIB):	$(obj).depend $(OBJS)
84	$(call cmd_link_o_target, $(OBJS))
85
86#########################################################################
87
88# defines $(obj).depend target
89include $(SRCTREE)/rules.mk
90
91sinclude $(obj).depend
92
93#########################################################################
94