From 7599872f9c86584264fc0dc4ddadfa982d02c46b Mon Sep 17 00:00:00 2001 From: Peter0x44 Date: Mon, 26 Aug 2024 23:46:01 +0100 Subject: [PATCH] Allow overriding CC for cross-compilation. (#262) In the case of SDL2 cross-compilation, I had to make this change. FTE_TARGET=SDL2_arm and such don't work. If I override the compiler with something like: make CC=aarch64-linux-gnu-gcc then this particular line reverts it to gcc and calls the system compiler anyway. I'm not sure why this line needs to exist at all. I did the same for windres, because it might also make sense to override it with an i686-w64-mingw32-windres. Or potentially for the aarch64-w64-mingw32 gcc in future. --- engine/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/Makefile b/engine/Makefile index 637cfabd2..0c952c6b4 100644 --- a/engine/Makefile +++ b/engine/Makefile @@ -23,8 +23,8 @@ #note: cross compiling will typically require 'make makelibs FTE_TARGET=mytarget', which avoids installing lots of extra system packages. # -CC=gcc -WINDRES=windres +CC?=gcc +WINDRES?=windres STRIP?=strip STRIPFLAGS=--strip-unneeded --remove-section=.comment