From 12e0f409cae058af17287facd424305f116d85b8 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 6 Apr 2017 15:53:40 +0200 Subject: [PATCH 1/2] Dont compile STM32F1 stuff for STM32F4 target --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index a97316d..e19172b 100644 --- a/Makefile +++ b/Makefile @@ -47,6 +47,7 @@ else ifdef SystemRoot else ASOURCES=$(shell find . -name '*.s') CSOURCES=$(shell find . -name '*.c') + CSOURCES:=$(filter-out $(wildcard ./system_stm32f1xx/*.c), $(CSOURCES)) CXXSOURCES=$(shell find . -name '*.cpp') CLEANCMD=rm -f $(OBJECTS) $(BINDIR)/$(BINELF) $(BINDIR)/$(BINHEX) $(BINDIR)/$(BINBIN) MDBIN=mkdir $@ From a062f504dae10a9eaa3807ec46137496ef818ab9 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 6 Apr 2017 17:31:46 +0200 Subject: [PATCH 2/2] A more general approach to ignore everything with stm32f1xx. Should also work with Windows GNU make --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e19172b..12b21b6 100644 --- a/Makefile +++ b/Makefile @@ -35,19 +35,21 @@ BINDIR=bin ifdef SYSTEMROOT ASOURCES=$(shell dir /S /B *.s) CSOURCES=$(shell dir /S /B *.c) + CSOURCES:=$(foreach a,$(CSOURCES),$(if $(findstring stm32f1xx,$a),,$a)) CXXSOURCES=$(shell dir /S /B *.cpp) CLEANCMD=del /S *.o *.hex *.bin *.elf MDBIN=md $@ else ifdef SystemRoot ASOURCES=$(shell dir /S /B *.s) CSOURCES=$(shell dir /S /B *.c) + CSOURCES:=$(foreach a,$(CSOURCES),$(if $(findstring stm32f1xx,$a),,$a)) CXXSOURCES=$(shell dir /S /B *.cpp) CLEANCMD=del /S *.o *.hex *.bin *.elf MDBIN=md $@ else ASOURCES=$(shell find . -name '*.s') CSOURCES=$(shell find . -name '*.c') - CSOURCES:=$(filter-out $(wildcard ./system_stm32f1xx/*.c), $(CSOURCES)) + CSOURCES:=$(foreach a,$(CSOURCES),$(if $(findstring stm32f1xx,$a),,$a)) CXXSOURCES=$(shell find . -name '*.cpp') CLEANCMD=rm -f $(OBJECTS) $(BINDIR)/$(BINELF) $(BINDIR)/$(BINHEX) $(BINDIR)/$(BINBIN) MDBIN=mkdir $@