aboutsummaryrefslogtreecommitdiff
path: root/Makefile.common
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.common')
-rw-r--r--Makefile.common41
1 files changed, 41 insertions, 0 deletions
diff --git a/Makefile.common b/Makefile.common
index 9dac061..1d5cbd8 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -44,3 +44,44 @@ SOURCES_C := \
SOURCES_C += $(LIBRETRO_DIR)/libretro.c
endif
+
+ifeq ($(DEBUG),1)
+FLAGS += -O0 -g
+else
+FLAGS += -O3 -DNDEBUG
+endif
+
+ifeq ($(PERF_TEST),1)
+FLAGS += -DPERF_TEST
+endif
+
+ifeq ($(USE_BLARGG_APU),1)
+FLAGS += -DUSE_BLARGG_APU
+endif
+
+ifeq ($(LOAD_FROM_MEMORY_TEST),1)
+FLAGS += -DLOAD_FROM_MEMORY_TEST
+endif
+
+DEFS += -DSPC700_C -DEXECUTE_SUPERFX_PER_LINE -DSDD1_DECOMP \
+ -DVAR_CYCLES -DCPU_SHUTDOWN -DSPC700_SHUTDOWN \
+ -DNO_INLINE_SET_GET -DHAVE_MKSTEMP '-DACCEPT_SIZE_T=size_t' -DWANT_CHEATS
+
+DEFS += -D__LIBRETRO__
+
+ifeq ($(OLD_GCC), 1)
+WARNINGS := -Wall
+else ifeq ($(NO_GCC), 1)
+WARNINGS :=
+else
+WARNINGS := -Wall \
+ -Wno-sign-compare \
+ -Wno-unused-variable \
+ -Wno-unused-function \
+ -Wno-uninitialized \
+ -Wno-strict-aliasing \
+ -Wno-overflow \
+ -fno-strict-overflow
+endif
+
+FLAGS += $(DEFS) $(WARNINGS) $(INCFLAGS) \ No newline at end of file