From 456dc8f245c164f17054528c8bc0f6ff8cf939fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0lteri=C5=9F=20Ero=C4=9Flu?= Date: Sun, 22 Aug 2021 20:40:29 +0300 Subject: [PATCH] Improve Macports support --- Makefile.defs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Makefile.defs b/Makefile.defs index 493c50ccd..3fcc94044 100644 --- a/Makefile.defs +++ b/Makefile.defs @@ -21,9 +21,9 @@ TAR = tar TARFLAGS ?= -v --ignore-failed-read -r TARFLAGS += -C .. -f CROSS ?= arm-none-eabi- -CC = gcc -CXX = g++ -LD = g++ +CC ?= gcc +CXX ?= g++ +LD ?= g++ SH = sh BASH = bash PERL = perl @@ -50,7 +50,8 @@ else endif ifeq ($(platform),Darwin) - USE_BREW = 1 + USE_BREW ?= 1 + USE_MACPORTS ?= 0 AR= /usr/bin/ar rcs RANLIB= /usr/bin/ranlib else @@ -60,11 +61,15 @@ endif ifeq ($(USE_BREW),1) BREW_PREFIX = $(shell brew --prefix 2>/dev/null) - ifeq ($(strip $(BREW_PREFIX)),) - MACPORTS_PREFIX ?= /opt/local + ifneq ($(strip $(BREW_PREFIX)),) + USE_BREW = 0 endif endif +ifeq ($(USE_MACPORTS),1) + MACPORTS_PREFIX ?= /opt/local +endif + ifeq ($(DEBUG),1) DEFCXXFLAGS = -g -O0 -pipe DEFCFLAGS = -g -O0 -fstrict-aliasing -pipe