CFLAGS += -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightning -Iinclude/lightrec \
-DLIGHTREC -DLIGHTREC_STATIC
LIGHTREC_CUSTOM_MAP ?= 0
-CFLAGS += -DLIGHTREC_CUSTOM_MAP=$(LIGHTREC_CUSTOM_MAP)
+LIGHTREC_THREADED_COMPILER ?= 0
+CFLAGS += -DLIGHTREC_CUSTOM_MAP=$(LIGHTREC_CUSTOM_MAP) \
+ -DLIGHTREC_ENABLE_THREADED_COMPILER=$(LIGHTREC_THREADED_COMPILER)
deps/lightning/lib/%.o: CFLAGS += -DHAVE_MMAP
ifeq ($(LIGHTREC_CUSTOM_MAP),1)
LDLIBS += -lrt
OBJS += libpcsxcore/lightrec/mem.o
endif
+ifeq ($(LIGHTREC_THREADED_COMPILER),1)
+OBJS += deps/lightrec/recompiler.o \
+ deps/lightrec/reaper.o
+endif
OBJS += deps/lightrec/tlsf/tlsf.o
OBJS += libpcsxcore/lightrec/plugin.o
OBJS += deps/lightning/lib/jit_disasm.o \
deps/lightrec/lightrec.o \
deps/lightrec/memmanager.o \
deps/lightrec/optimizer.o \
- deps/lightrec/regcache.o \
- deps/lightrec/recompiler.o \
- deps/lightrec/reaper.o
+ deps/lightrec/regcache.o
libpcsxcore/lightrec/mem.o: CFLAGS += -D_GNU_SOURCE
ifeq ($(MMAP_WIN32),1)
CFLAGS += -Iinclude/mman -I deps/mman
#ifndef __LIGHTREC_CONFIG_H__
#define __LIGHTREC_CONFIG_H__
-#define ENABLE_THREADED_COMPILER 1
+#define ENABLE_THREADED_COMPILER LIGHTREC_ENABLE_THREADED_COMPILER
#define ENABLE_FIRST_PASS 1
#define ENABLE_DISASSEMBLER 0
#define ENABLE_CODE_BUFFER 1