X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=drivers%2Fmtd%2Fspi%2FMakefile;h=fcda02341216ec9da1dd8068e1f3d9c221d189e8;hb=a64893614305b544715bb6b22c10b68b9f9b1b96;hp=86ffc59d039ecb040eab8c2a2a770c4571cb30f7;hpb=bff4fae4fc29376e62ac6d420b189f23a57e4294;p=oweals%2Fu-boot.git diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile index 86ffc59d03..fcda023412 100644 --- a/drivers/mtd/spi/Makefile +++ b/drivers/mtd/spi/Makefile @@ -5,36 +5,14 @@ # SPDX-License-Identifier: GPL-2.0+ # -include $(TOPDIR)/config.mk - -LIB := $(obj)libspi_flash.o +obj-$(CONFIG_DM_SPI_FLASH) += sf-uclass.o ifdef CONFIG_SPL_BUILD -COBJS-$(CONFIG_SPL_SPI_LOAD) += spi_spl_load.o -COBJS-$(CONFIG_SPL_SPI_BOOT) += fsl_espi_spl.o -endif - -ifdef CONFIG_CMD_SF -COBJS-y += sf.o +obj-$(CONFIG_SPL_SPI_BOOT) += fsl_espi_spl.o +obj-$(CONFIG_SPL_SPI_SUNXI) += sunxi_spi_spl.o endif -COBJS-$(CONFIG_SPI_FLASH) += sf_probe.o sf_ops.o -COBJS-$(CONFIG_SPI_FRAM_RAMTRON) += ramtron.o -COBJS-$(CONFIG_SPI_M95XXX) += eeprom_m95xxx.o - -COBJS := $(COBJS-y) -SRCS := $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) - -all: $(LIB) - -$(LIB): $(obj).depend $(OBJS) - $(call cmd_link_o_target, $(OBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend -######################################################################### +obj-$(CONFIG_SPI_FLASH) += sf_probe.o spi_flash.o spi_flash_ids.o sf.o +obj-$(CONFIG_SPI_FLASH_DATAFLASH) += sf_dataflash.o +obj-$(CONFIG_SPI_FLASH_MTD) += sf_mtd.o +obj-$(CONFIG_SPI_FLASH_SANDBOX) += sandbox.o