From 45321fe5903c92f972948ec8c582a438215770be Mon Sep 17 00:00:00 2001 From: Rene Hopf Date: Thu, 5 Jan 2017 15:08:00 +0100 Subject: [PATCH] move toolchain definition to seperate file --- Makefile | 10 +--------- bootloader/Makefile | 10 +--------- stm32f103/Makefile | 10 +--------- toolchain.mak | 8 ++++++++ 4 files changed, 11 insertions(+), 27 deletions(-) create mode 100644 toolchain.mak diff --git a/Makefile b/Makefile index ebc5912a..d45ba16e 100644 --- a/Makefile +++ b/Makefile @@ -152,15 +152,6 @@ LDFLAGS += -T$(LDSCRIPT) #============================================================================ -# Define programs and commands -# -TOOLCHAIN = arm-none-eabi- -CC = $(TOOLCHAIN)gcc -OBJCOPY = $(TOOLCHAIN)objcopy -OBJDUMP = $(TOOLCHAIN)objdump -SIZE = $(TOOLCHAIN)size -NM = $(TOOLCHAIN)nm -MKDIR = mkdir POSTLD = tools/add_version_info.py # -q # Compiler flags to generate dependency files @@ -246,6 +237,7 @@ clean: # Include the base rules # include base.mak +include toolchain.mak # Include the dependency files # diff --git a/bootloader/Makefile b/bootloader/Makefile index 5acc2585..59c7f57b 100644 --- a/bootloader/Makefile +++ b/bootloader/Makefile @@ -109,15 +109,6 @@ LDFLAGS += -T$(LDSCRIPT) #============================================================================ -# Define programs and commands -# -TOOLCHAIN = arm-none-eabi- -CC = $(TOOLCHAIN)gcc -OBJCOPY = $(TOOLCHAIN)objcopy -OBJDUMP = $(TOOLCHAIN)objdump -SIZE = $(TOOLCHAIN)size -NM = $(TOOLCHAIN)nm -MKDIR = mkdir POSTLD = tools/add_version_info.py # -q # Compiler flags to generate dependency files @@ -178,6 +169,7 @@ clean: # Include the base rules # include base.mak +include toolchain.mak # Include the dependency files # diff --git a/stm32f103/Makefile b/stm32f103/Makefile index 09559d4d..7ae03d93 100644 --- a/stm32f103/Makefile +++ b/stm32f103/Makefile @@ -109,15 +109,6 @@ LDFLAGS += -T$(LDSCRIPT) #============================================================================ -# Define programs and commands -# -TOOLCHAIN = arm-none-eabi- -CC = $(TOOLCHAIN)gcc -OBJCOPY = $(TOOLCHAIN)objcopy -OBJDUMP = $(TOOLCHAIN)objdump -SIZE = $(TOOLCHAIN)size -NM = $(TOOLCHAIN)nm -MKDIR = mkdir POSTLD = tools/add_version_info.py # -q # Compiler flags to generate dependency files @@ -173,6 +164,7 @@ clean: # Include the base rules # include base.mak +include toolchain.mak # Include the dependency files # diff --git a/toolchain.mak b/toolchain.mak new file mode 100644 index 00000000..e0c4504e --- /dev/null +++ b/toolchain.mak @@ -0,0 +1,8 @@ +# Define programs and commands for the toolchain +TOOLCHAIN = arm-none-eabi- +CC = $(TOOLCHAIN)gcc +OBJCOPY = $(TOOLCHAIN)objcopy +OBJDUMP = $(TOOLCHAIN)objdump +SIZE = $(TOOLCHAIN)size +NM = $(TOOLCHAIN)nm +MKDIR = mkdir