Exclude debug.c from compilation unless DEBUG is defined

This commit is contained in:
twinaphex
2015-08-06 13:37:09 +02:00
parent 21aa0759da
commit 9d99bd0eaa
3 changed files with 8 additions and 2 deletions

View File

@@ -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 += \

View File

@@ -216,7 +216,7 @@ else
endif
ifeq ($(DEBUG), 1)
CFLAGS += -O0 -g
CFLAGS += -O0 -g -DDEBUG
else
CFLAGS += -O3 -DNDEBUG
endif

View File

@@ -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"