Makefile: Fix build on Windows and Android
authorPaul Cercueil <paul@crapouillou.net>
Mon, 30 May 2022 17:23:02 +0000 (18:23 +0100)
committerPaul Cercueil <paul@crapouillou.net>
Mon, 30 May 2022 17:26:09 +0000 (18:26 +0100)
Fix build under MinGW where the rt library wasn't found, and on Android
where the dynarec isn't Lightrec but Ari64.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Makefile

index bff1a1c..de2641b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -48,6 +48,7 @@ CFLAGS += -DPCNT
 endif
 
 LIGHTREC_CUSTOM_MAP ?= 0
+CFLAGS += -DLIGHTREC_CUSTOM_MAP=$(LIGHTREC_CUSTOM_MAP)
 
 # core
 OBJS += libpcsxcore/cdriso.o libpcsxcore/cdrom.o libpcsxcore/cheat.o libpcsxcore/database.o \
@@ -91,10 +92,9 @@ libpcsxcore/psxbios.o: CFLAGS += -Wno-nonnull
 # dynarec
 ifeq "$(DYNAREC)" "lightrec"
 CFLAGS += -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec \
-                 -DLIGHTREC -DLIGHTREC_STATIC \
-                 -DLIGHTREC_CUSTOM_MAP=$(LIGHTREC_CUSTOM_MAP)
-LDLIBS += -lrt
+                 -DLIGHTREC -DLIGHTREC_STATIC
 ifeq ($(LIGHTREC_CUSTOM_MAP),1)
+LDLIBS += -lrt
 OBJS += libpcsxcore/lightrec/mem.o
 endif
 OBJS += libpcsxcore/lightrec/plugin.o