lightrec: try to clean up intergarion, fix -O0
[pcsx_rearmed.git] / Makefile
index bff1a1c..66675ff 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -47,8 +47,6 @@ ifdef PCNT
 CFLAGS += -DPCNT
 endif
 
-LIGHTREC_CUSTOM_MAP ?= 0
-
 # core
 OBJS += libpcsxcore/cdriso.o libpcsxcore/cdrom.o libpcsxcore/cheat.o libpcsxcore/database.o \
        libpcsxcore/decode_xa.o libpcsxcore/mdec.o \
@@ -91,12 +89,15 @@ 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
+LIGHTREC_CUSTOM_MAP ?= 0
+CFLAGS += -DLIGHTREC_CUSTOM_MAP=$(LIGHTREC_CUSTOM_MAP)
+deps/lightning/lib/%.o: CFLAGS += -DHAVE_MMAP
 ifeq ($(LIGHTREC_CUSTOM_MAP),1)
+LDLIBS += -lrt
 OBJS += libpcsxcore/lightrec/mem.o
 endif
+OBJS += deps/lightrec/tlsf/tlsf.o
 OBJS += libpcsxcore/lightrec/plugin.o
 OBJS += deps/lightning/lib/jit_disasm.o \
                deps/lightning/lib/jit_memory.o \