Fix compilation with DEBUG flag

- Use DEBUG flag similar to other libretro cores (DEBUG=0 disables,
  DEBUG=1 enables the debug build)
- Optimize with -O2 for debugging because the core won't work otherwise
- Always strip sections to prevent undefined symbol errors
This commit is contained in:
Christian Fetzer 2016-12-05 23:12:44 +01:00
parent 0d87bd6a48
commit 779d96d907

View File

@ -1,16 +1,19 @@
TARGET ?= PicoDrive
DEBUG = 0
CFLAGS += -Wall
CFLAGS += -I. -DINLINE=inline
ifndef DEBUG
ifeq ($(DEBUG),0)
ifeq ($(platform), vita)
CFLAGS += -O3 -DNDEBUG
else
CFLAGS += -O2 -DNDEBUG -ffunction-sections
endif
else
CFLAGS += -g -O2
endif
ifneq ($(APPLE),1)
LDFLAGS += -Wl,--gc-sections
endif
endif
#CFLAGS += -DEVT_LOG
#CFLAGS += -DDRC_CMP
#cpu_cmp = 1