Skip to content
Snippets Groups Projects
Commit 984effd5 authored by Oleg Hahm's avatar Oleg Hahm
Browse files

make: added a check for compiler existence

parent 42e251aa
No related branches found
No related tags found
No related merge requests found
...@@ -154,7 +154,7 @@ LINKFLAGPREFIX ?= -Wl, ...@@ -154,7 +154,7 @@ LINKFLAGPREFIX ?= -Wl,
DIRS += $(EXTERNAL_MODULE_DIRS) DIRS += $(EXTERNAL_MODULE_DIRS)
## make script for your application. Build RIOT-base here! ## make script for your application. Build RIOT-base here!
all: ..build-message $(USEPKG:%=${BINDIR}%.a) $(APPDEPS) all: ..compiler-check ..build-message $(USEPKG:%=${BINDIR}%.a) $(APPDEPS)
$(AD)DIRS="$(DIRS)" "$(MAKE)" -C $(CURDIR) -f $(RIOTBASE)/Makefile.application $(AD)DIRS="$(DIRS)" "$(MAKE)" -C $(CURDIR) -f $(RIOTBASE)/Makefile.application
ifeq (,$(RIOTNOLINK)) ifeq (,$(RIOTNOLINK))
ifeq ($(BUILDOSXNATIVE),1) ifeq ($(BUILDOSXNATIVE),1)
...@@ -166,6 +166,12 @@ endif ...@@ -166,6 +166,12 @@ endif
$(AD)$(OBJCOPY) $(OFLAGS) $(ELFFILE) $(HEXFILE) $(AD)$(OBJCOPY) $(OFLAGS) $(ELFFILE) $(HEXFILE)
endif endif
..compiler-check:
$(AD)command -v $(CC) >/dev/null 2>&1 || \
{ $(COLOR_ECHO) \
'${COLOR_RED} Compiler $(CC) is required but not found in PATH. Aborting.${COLOR_RESET}'; \
exit 1; }
..build-message: ..build-message:
@$(COLOR_ECHO) '${COLOR_GREEN}Building application "$(APPLICATION)" for "$(BOARD)" with MCU "$(MCU)".${COLOR_RESET}' @$(COLOR_ECHO) '${COLOR_GREEN}Building application "$(APPLICATION)" for "$(BOARD)" with MCU "$(MCU)".${COLOR_RESET}'
@$(COLOR_ECHO) @$(COLOR_ECHO)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment