X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Makefile;h=57fee2fc2623c8af7e17dd21c073aa4f4abc590a;hb=e2b025820999244fbb3719530a654732643e6036;hp=642a4c66f103381cc4288f30e4693fce41a5e86b;hpb=76d645bee12cfcfbaa8d364d5e335a5471acf84d;p=pcsx_rearmed.git diff --git a/Makefile b/Makefile index 642a4c66..57fee2fc 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,9 @@ 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) \ @@ -45,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 @@ -421,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