aboutsummaryrefslogtreecommitdiff
path: root/OpenCM.mk
diff options
context:
space:
mode:
authorPieter du Preez <pdupreez@gmail.com>2018-09-14 16:14:14 +0200
committerPieter du Preez <pdupreez@gmail.com>2018-09-14 16:14:14 +0200
commite44540043edb15c0ab7eab2a8d0cb3241933ce8e (patch)
treea7d8c232034d5fb4a2a74116d11ac360bca0c9dd /OpenCM.mk
parent2442dafb4fa8a7f0c5212a0d0f6e3fbafb986b29 (diff)
Added the TOOL_PREFIX variable for setting up the executable tools.
Currently three different tool chains seem to be used: * avr-* * pic32-* * arm-none-eabi-* These all get set up independently. This patch centralizes the definitions of the executable tools and does it generically, by means of the newly introduced TOOL_PREFIX variable. Setting up a tool chain is now simply a matter of defining the TOOL_PREFIX variable. For the currently supported tool chains it gets set to avr, pic32 or arm-none-eabi. Arbitrary tool chains can now easily be set up, by the TOOL_PREFIX variable. Although the use of the OVERRIDE_EXECUTABLES variable is now almost not justifiable, it was left as-is, in order to assure backwards compatibility.
Diffstat (limited to 'OpenCM.mk')
-rw-r--r--OpenCM.mk72
1 files changed, 1 insertions, 71 deletions
diff --git a/OpenCM.mk b/OpenCM.mk
index fd73af5..b6d0534 100644
--- a/OpenCM.mk
+++ b/OpenCM.mk
@@ -69,77 +69,7 @@ endif
########################################################################
# command names
-ifndef CC_NAME
- CC_NAME := $(call PARSE_BOARD,$(BOARD_TAG),build.command.gcc)
- ifndef CC_NAME
- CC_NAME := arm-none-eabi-gcc
- else
- $(call show_config_variable,CC_NAME,[COMPUTED])
- endif
-endif
-
-ifndef CXX_NAME
- CXX_NAME := $(call PARSE_BOARD,$(BOARD_TAG),build.command.g++)
- ifndef CXX_NAME
- CXX_NAME := arm-none-eabi-g++
- else
- $(call show_config_variable,CXX_NAME,[COMPUTED])
- endif
-endif
-
-ifndef AS_NAME
- AS_NAME := $(call PARSE_BOARD,$(BOARD_TAG),build.command.as)
- ifndef AS_NAME
- AS_NAME := arm-none-eabi-as
- else
- $(call show_config_variable,AS_NAME,[COMPUTED])
- endif
-endif
-
-ifndef OBJDUMP_NAME
- OBJDUMP_NAME := $(call PARSE_BOARD,$(BOARD_TAG),build.command.objdump)
- ifndef OBJDUMP_NAME
- OBJDUMP_NAME := arm-none-eabi-objdump
- else
- $(call show_config_variable,OBJDUMP_NAME,[COMPUTED])
- endif
-endif
-
-ifndef AR_NAME
- AR_NAME := $(call PARSE_BOARD,$(BOARD_TAG),build.command.ar)
- ifndef AR_NAME
- AR_NAME := arm-none-eabi-ar
- else
- $(call show_config_variable,AR_NAME,[COMPUTED])
- endif
-endif
-
-ifndef SIZE_NAME
- SIZE_NAME := $(call PARSE_BOARD,$(BOARD_TAG),build.command.size)
- ifndef SIZE_NAME
- SIZE_NAME := arm-none-eabi-size
- else
- $(call show_config_variable,SIZE_NAME,[COMPUTED])
- endif
-endif
-
-ifndef NM_NAME
- NM_NAME := $(call PARSE_BOARD,$(BOARD_TAG),build.command.nm)
- ifndef NM_NAME
- NM_NAME := arm-none-eabi-nm
- else
- $(call show_config_variable,NM_NAME,[COMPUTED])
- endif
-endif
-
-ifndef OBJCOPY_NAME
- OBJCOPY_NAME := $(call PARSE_BOARD,$(BOARD_TAG),build.command.objcopy)
- ifndef OBJCOPY_NAME
- OBJCOPY_NAME := arm-none-eabi-objcopy
- else
- $(call show_config_variable,OBJCOPY_NAME,[COMPUTED])
- endif
-endif
+TOOL_PREFIX = arm-none-eabi
# processor stuff
ifndef MCU