From fd2079354572372f4516fcc13c51992ef4b4c715 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 27 Mar 2021 15:09:01 +0100 Subject: Add CROSS_COMPILE rules --- Makefile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index dfc7c37..4a5806d 100644 --- a/Makefile +++ b/Makefile @@ -104,10 +104,18 @@ else ifeq ($(platform), osx) ifeq ($(HAVE_DYNAREC),1) HAVE_MMAP = 1 endif - ifndef ($(NOUNIVERSAL)) - CFLAGS += $(ARCHFLAGS) - LDFLAGS += $(ARCHFLAGS) - endif + + ifeq ($(CROSS_COMPILE),1) + TARGET_RULE = -target $(LIBRETRO_APPLE_PLATFORM) -isysroot $(LIBRETRO_APPLE_ISYSROOT) + CFLAGS += $(TARGET_RULE) + CPPFLAGS += $(TARGET_RULE) + CXXFLAGS += $(TARGET_RULE) + LDFLAGS += $(TARGET_RULE) + endif + + CFLAGS += $(ARCHFLAGS) + CXXFLAGS += $(ARCHFLAGS) + LDFLAGS += $(ARCHFLAGS) # iOS else ifneq (,$(findstring ios,$(platform))) -- cgit v1.2.3