From b168422d8a82c09bab2ad7ff07c7517f640b0b1d Mon Sep 17 00:00:00 2001 From: "S.J.R. van Schaik" Date: Tue, 1 Aug 2017 16:26:25 +0200 Subject: [PATCH] make: move spi_flash.c to source/platform --- scripts/Makefile.stm32f0 | 1 - scripts/Makefile.stm32f1 | 1 - source/platform/Makefile | 5 +++++ source/{drivers => platform}/spi_flash.c | 0 4 files changed, 5 insertions(+), 2 deletions(-) rename source/{drivers => platform}/spi_flash.c (100%) diff --git a/scripts/Makefile.stm32f0 b/scripts/Makefile.stm32f0 index 89d3daf..0d823e6 100644 --- a/scripts/Makefile.stm32f0 +++ b/scripts/Makefile.stm32f0 @@ -22,7 +22,6 @@ LIBS += -l$(OPENCM3_LIBNAME) STLINK_PORT ?= :4242 obj-y += source/core/spi.o -obj-y += source/drivers/spi_flash.o $(OPENCM3_DIR)/lib/lib$(OPENCM3_LIBNAME).a: @if [ ! -e libopencm3/.git ]; then \ diff --git a/scripts/Makefile.stm32f1 b/scripts/Makefile.stm32f1 index 6a13436..2781c8b 100644 --- a/scripts/Makefile.stm32f1 +++ b/scripts/Makefile.stm32f1 @@ -22,7 +22,6 @@ LIBS += -l$(OPENCM3_LIBNAME) STLINK_PORT ?= :4242 obj-y += source/core/spi.o -obj-y += source/drivers/spi_flash.o $(OPENCM3_DIR)/lib/lib$(OPENCM3_LIBNAME).a: @if [ ! -e libopencm3/.git ]; then \ diff --git a/source/platform/Makefile b/source/platform/Makefile index 09f2a89..760e9b4 100644 --- a/source/platform/Makefile +++ b/source/platform/Makefile @@ -1 +1,6 @@ +ifeq ($(TARGET),host) +else +obj-y += source/platform/spi_flash.o +endif + -include source/platform/$(TARGET)/Makefile diff --git a/source/drivers/spi_flash.c b/source/platform/spi_flash.c similarity index 100% rename from source/drivers/spi_flash.c rename to source/platform/spi_flash.c