lightrec: Enable code buffer support
[pcsx_rearmed.git] / Makefile
index bff1a1c..3aa06b7 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,11 +92,11 @@ 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
+deps/lightning/lib/%.o: CFLAGS += -DHAVE_MMAP
 ifeq ($(LIGHTREC_CUSTOM_MAP),1)
-OBJS += libpcsxcore/lightrec/mem.o
+LDLIBS += -lrt
+OBJS += libpcsxcore/lightrec/mem.o deps/lightrec/tlsf/tlsf.o
 endif
 OBJS += libpcsxcore/lightrec/plugin.o
 OBJS += deps/lightning/lib/jit_disasm.o \