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