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