From f3a66eaa06c6b355ec551b622072b9e468066b4e Mon Sep 17 00:00:00 2001 From: David Chavez Date: Mon, 30 May 2022 16:54:21 +0200 Subject: [PATCH] Restore original structure while supporting custom CXX flags --- ZAPDTR/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ZAPDTR/Makefile b/ZAPDTR/Makefile index b8e2a0a4a..bd3116371 100644 --- a/ZAPDTR/Makefile +++ b/ZAPDTR/Makefile @@ -9,7 +9,12 @@ LLD ?= 0 WERROR ?= 0 UNAME := $(shell uname) -CXX ?= g++ +# Use clang++ if available, else use g++ +ifeq ($(shell command -v clang++ >/dev/null 2>&1; echo $$?),0) + CXX ?= clang++ +else + CXX ?= g++ +endif INC := -I ZAPD -I lib/elfio -I lib/libgfxd -I lib/tinyxml2 -I ZAPDUtils CXXFLAGS := -fpic -std=c++17 -Wall -Wextra -fno-omit-frame-pointer