mirror of
https://github.com/holub/mame
synced 2025-06-08 13:53:52 +03:00
Respect OVERRIDE_CC and OVERRIDE_CXX
This commit is contained in:
parent
b7710688d6
commit
f5371ffa1b
12
makefile
12
makefile
@ -755,20 +755,21 @@ endif
|
|||||||
else
|
else
|
||||||
GCC_VERSION := $(shell $(subst @,,$(CC)) -dumpversion 2> /dev/null)
|
GCC_VERSION := $(shell $(subst @,,$(CC)) -dumpversion 2> /dev/null)
|
||||||
ifneq ($(OS),solaris)
|
ifneq ($(OS),solaris)
|
||||||
CLANG_VERSION := $(shell clang --version 2> /dev/null | head -n 1 | grep -e 'version [0-9]\.[0-9]\(\.[0-9]\)\?' -o | grep -e '[0-9]\.[0-9]\(\.[0-9]\)\?' -o | tail -n 1)
|
CLANG_VERSION := $(shell $(subst @,,$(CC)) --version 2> /dev/null | head -n 1 | grep -e 'version [0-9]\.[0-9]\(\.[0-9]\)\?' -o | grep -e '[0-9]\.[0-9]\(\.[0-9]\)\?' -o | tail -n 1)
|
||||||
endif
|
endif
|
||||||
PYTHON_AVAILABLE := $(shell $(PYTHON) --version > /dev/null 2>&1 && echo python)
|
PYTHON_AVAILABLE := $(shell $(PYTHON) --version > /dev/null 2>&1 && echo python)
|
||||||
CHECK_CLANG := $(shell gcc --version 2> /dev/null | grep 'clang' | head -n 1)
|
CHECK_CLANG := $(shell $(subst @,,$(CC)) --version 2> /dev/null | grep 'clang' | head -n 1)
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(CLANG_VERSION),)
|
||||||
ifeq ($(TARGETOS),macosx)
|
$(info GCC $(GCC_VERSION) detected)
|
||||||
|
else
|
||||||
|
$(info Clang $(CLANG_VERSION) detected)
|
||||||
ifeq ($(ARCHITECTURE),_x64)
|
ifeq ($(ARCHITECTURE),_x64)
|
||||||
ARCHITECTURE := _x64_clang
|
ARCHITECTURE := _x64_clang
|
||||||
else
|
else
|
||||||
ARCHITECTURE := _x86_clang
|
ARCHITECTURE := _x86_clang
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(PYTHON_AVAILABLE),python)
|
ifneq ($(PYTHON_AVAILABLE),python)
|
||||||
$(error Python is not available in path)
|
$(error Python is not available in path)
|
||||||
endif
|
endif
|
||||||
@ -1264,4 +1265,3 @@ endif
|
|||||||
cppcheck:
|
cppcheck:
|
||||||
@echo Generate CppCheck analysis report
|
@echo Generate CppCheck analysis report
|
||||||
cppcheck --enable=all src/ $(CPPCHECK_PARAMS) -j9
|
cppcheck --enable=all src/ $(CPPCHECK_PARAMS) -j9
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user