diff --git a/Makefile b/Makefile index bcd822d4b8..19ebd2a682 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,10 @@ NON_MATCHING ?= 0 # If ORIG_COMPILER is 1, compile with QEMU_IRIX and the original compiler ORIG_COMPILER ?= 0 +# Set prefix to mips binutils binaries (mips-linux-gnu-ld => 'mips-linux-gnu-') - Change at your own risk! +# In nearly all cases, not having 'mips-linux-gnu-*' binaries on the PATH is indicative of missing dependencies +MIPS_BINUTILS_PREFIX ?= mips-linux-gnu- + ifeq ($(NON_MATCHING),1) CFLAGS := -DNON_MATCHING CPPFLAGS := -DNON_MATCHING @@ -37,10 +41,8 @@ endif N_THREADS ?= $(shell nproc) #### Tools #### -ifeq ($(shell type mips-linux-gnu-ld >/dev/null 2>/dev/null; echo $$?), 0) - MIPS_BINUTILS_PREFIX := mips-linux-gnu- -else - $(error Please install or build mips-linux-gnu) +ifneq ($(shell type $(MIPS_BINUTILS_PREFIX)ld >/dev/null 2>/dev/null; echo $$?), 0) + $(error Please install or build $(MIPS_BINUTILS_PREFIX)) endif CC := tools/ido_recomp/$(DETECTED_OS)/7.1/cc