X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile;h=57fee2fc2623c8af7e17dd21c073aa4f4abc590a;hb=c296224f47ceebab4d6fbd071959bff294e80293;hp=2f58674bae5e5014fa2012a14d720ae0a523cf93;hpb=8c58254620b74c4697cdc0e81f222490bc4f318a;p=pcsx_rearmed.git diff --git a/Makefile b/Makefile index 2f58674b..57fee2fc 100644 --- a/Makefile +++ b/Makefile @@ -12,9 +12,13 @@ else CFLAGS += -O2 -DNDEBUG endif endif +ifeq ($(DEBUG_ASAN), 1) +CFLAGS += -fsanitize=address +endif CFLAGS += -DP_HAVE_MMAP=$(if $(NO_MMAP),0,1) \ -DP_HAVE_PTHREAD=$(if $(NO_PTHREAD),0,1) \ - -DP_HAVE_POSIX_MEMALIGN=$(if $(NO_POSIX_MEMALIGN),0,1) + -DP_HAVE_POSIX_MEMALIGN=$(if $(NO_POSIX_MEMALIGN),0,1) \ + -DDISABLE_MEM_LUTS=0 CXXFLAGS += $(CFLAGS) #DRC_DBG = 1 #PCNT = 1 @@ -44,6 +48,9 @@ endif CC_LINK ?= $(CC) CC_AS ?= $(CC) LDFLAGS += $(MAIN_LDFLAGS) +ifeq ($(DEBUG_ASAN), 1) +LDFLAGS += -static-libasan +endif EXTRA_LDFLAGS ?= -Wl,-Map=$@.map LDLIBS += $(MAIN_LDLIBS) ifdef PCNT @@ -54,9 +61,10 @@ endif OBJS += libpcsxcore/cdriso.o libpcsxcore/cdrom.o libpcsxcore/cheat.o libpcsxcore/database.o \ libpcsxcore/decode_xa.o libpcsxcore/mdec.o \ libpcsxcore/misc.o libpcsxcore/plugins.o libpcsxcore/ppf.o libpcsxcore/psxbios.o \ - libpcsxcore/psxcommon.o libpcsxcore/psxcounters.o libpcsxcore/psxdma.o libpcsxcore/psxhle.o \ - libpcsxcore/psxhw.o libpcsxcore/psxinterpreter.o libpcsxcore/psxmem.o libpcsxcore/r3000a.o \ - libpcsxcore/sio.o libpcsxcore/spu.o + libpcsxcore/psxcommon.o libpcsxcore/psxcounters.o libpcsxcore/psxdma.o \ + libpcsxcore/psxhw.o libpcsxcore/psxinterpreter.o libpcsxcore/psxmem.o \ + libpcsxcore/psxevents.o libpcsxcore/r3000a.o \ + libpcsxcore/sio.o libpcsxcore/spu.o libpcsxcore/gpu.o OBJS += libpcsxcore/gte.o libpcsxcore/gte_nf.o libpcsxcore/gte_divider.o ifeq ($(DEBUG), 1) @@ -129,6 +137,8 @@ OBJS += deps/lightning/lib/jit_disasm.o \ deps/lightrec/optimizer.o \ deps/lightrec/regcache.o deps/lightning/%.o: CFLAGS += -DHAVE_MMAP=P_HAVE_MMAP +deps/lightning/%: CFLAGS += -w +deps/lightrec/%: CFLAGS += -w libpcsxcore/lightrec/mem.o: CFLAGS += -D_GNU_SOURCE ifeq ($(MMAP_WIN32),1) CFLAGS += -Iinclude/mman -I deps/mman @@ -149,7 +159,7 @@ OBJS += libpcsxcore/new_dynarec/pcsxmem.o else CFLAGS += -DDRC_DISABLE endif -OBJS += libpcsxcore/new_dynarec/emu_if.o libpcsxcore/new_dynarec/events.o +OBJS += libpcsxcore/new_dynarec/emu_if.o libpcsxcore/new_dynarec/new_dynarec.o: libpcsxcore/new_dynarec/pcsxmem_inline.c ifdef DRC_DBG libpcsxcore/new_dynarec/emu_if.o: CFLAGS += -D_FILE_OFFSET_BITS=64 @@ -265,11 +275,6 @@ CFLAGS += -DHAVE_CHD -D_7ZIP_ST LDFLAGS += -lm endif -# dfinput -ifneq "$(PLATFORM)" "libretro" -OBJS += plugins/dfinput/main.o plugins/dfinput/pad.o plugins/dfinput/guncon.o -endif - # frontend/gui OBJS += frontend/cspace.o ifeq "$(HAVE_NEON_ASM)" "1" @@ -379,7 +384,7 @@ endif # misc OBJS += frontend/main.o frontend/plugin.o - +frontend/main.o: CFLAGS += -DBUILTIN_GPU=$(BUILTIN_GPU) frontend/menu.o frontend/main.o: frontend/revision.h frontend/plat_sdl.o frontend/libretro.o: frontend/revision.h @@ -412,7 +417,7 @@ $(TARGET): $(OBJS) ifeq ($(STATIC_LINKING), 1) $(AR) rcs $@ $(OBJS) else - $(CC_LINK) -o $@ $^ $(LDFLAGS) $(LDLIBS) $(EXTRA_LDFLAGS) + $(CC_LINK) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS) $(EXTRA_LDFLAGS) endif clean: $(PLAT_CLEAN) clean_plugins @@ -422,10 +427,10 @@ ifneq ($(PLUGINS),) plugins_: $(PLUGINS) $(PLUGINS): - make -C $(dir $@) + $(MAKE) -C $(dir $@) clean_plugins: - make -C plugins/gpulib/ clean + $(MAKE) -C plugins/gpulib/ clean for dir in $(PLUGINS) ; do \ $(MAKE) -C $$(dirname $$dir) clean; done else