From e44540043edb15c0ab7eab2a8d0cb3241933ce8e Mon Sep 17 00:00:00 2001 From: Pieter du Preez Date: Fri, 14 Sep 2018 16:14:14 +0200 Subject: 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. --- OpenCM.mk | 72 +-------------------------------------------------------------- 1 file changed, 1 insertion(+), 71 deletions(-) (limited to 'OpenCM.mk') 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 -- cgit v1.2.3