From 9d99bd0eaa2b0f158783f205ed6feb725179f794 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 6 Aug 2015 13:37:09 +0200 Subject: [PATCH] Exclude debug.c from compilation unless DEBUG is defined --- Makefile.common | 5 ++++- Makefile.libretro | 2 +- src/drivers/libretro/griffin.c | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) 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"