From 2be183efa9cf902919118182be2bc7e3b2c951dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Sat, 16 Nov 2019 20:57:30 +0700 Subject: [PATCH] Compile cyclone with the host g++ (#110) --- Makefile | 2 ++ platform/common/common.mak | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6625becb..644664d5 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ $(LD) ?= $(CC) TARGET ?= PicoDrive CFLAGS += -I. +HOST_CC ?= gcc +HOST_CXX ?= g++ ifneq ("$(PLATFORM)", "libretro") CFLAGS += -Wall -g diff --git a/platform/common/common.mak b/platform/common/common.mak index 89e46051..d66e8b14 100644 --- a/platform/common/common.mak +++ b/platform/common/common.mak @@ -181,7 +181,7 @@ $(FR)cpu/cyclone/Cyclone.h: $(FR)cpu/cyclone/Cyclone.s: $(FR)cpu/$(CYCLONE_CONFIG) @echo building Cyclone... - @make -C $(R)cpu/cyclone/ CONFIG_FILE=../$(CYCLONE_CONFIG) + @make CC=$(HOST_CC) CXX=$(HOST_CXX) -C $(R)cpu/cyclone/ CONFIG_FILE=../$(CYCLONE_CONFIG) $(FR)cpu/cyclone/Cyclone.s: $(FR)cpu/cyclone/*.cpp $(FR)cpu/cyclone/*.h