diff --git a/Makefile.common b/Makefile.common index 536b3ce..bfe1b3e 100644 --- a/Makefile.common +++ b/Makefile.common @@ -13,7 +13,6 @@ SOURCES_C += \ $(CORE_DIR)/cart.c \ $(CORE_DIR)/cheat.c \ $(CORE_DIR)/crc32.c \ - $(CORE_DIR)/debug.c \ $(CORE_DIR)/fceu-endian.c \ $(CORE_DIR)/fceu-memory.c \ $(CORE_DIR)/misc.c \ @@ -31,6 +30,10 @@ SOURCES_C += \ $(CORE_DIR)/state.c \ $(CORE_DIR)/video.c \ $(CORE_DIR)/vsuni.c + +ifeq ($(DEBUG),1) +SOURCES_C += $(CORE_DIR)/debug.c +endif endif SOURCES_C += \ diff --git a/Makefile.libretro b/Makefile.libretro index 368de11..5b1ec5b 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -216,7 +216,7 @@ else endif ifeq ($(DEBUG), 1) - CFLAGS += -O0 -g + CFLAGS += -O0 -g -DDEBUG else CFLAGS += -O3 -DNDEBUG endif diff --git a/src/drivers/libretro/griffin.c b/src/drivers/libretro/griffin.c index 4c005c5..1461d98 100644 --- a/src/drivers/libretro/griffin.c +++ b/src/drivers/libretro/griffin.c @@ -7,7 +7,10 @@ #include "cart.c" #include "cheat.c" #include "crc32.c" + +#ifdef DEBUG #include "debug.c" +#endif #include "fceu-endian.c" #include "fceu-memory.c" #include "misc.c"