diff --git a/core/core.mk b/core/core.mk index 3db58fb2b..bd458e5eb 100755 --- a/core/core.mk +++ b/core/core.mk @@ -83,7 +83,7 @@ endif ifdef FOR_PANDORA RZDCY_CFLAGS := \ $(CFLAGS) -c -O3 \ - -DRELEASE -DPANDORA\ + -DNDEBUG -DPANDORA\ -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp \ -frename-registers -fsingle-precision-constant -ffast-math \ -ftree-vectorize -fomit-frame-pointer @@ -93,7 +93,7 @@ else ifdef FOR_ANDROID RZDCY_CFLAGS := \ $(CFLAGS) -c -O3 \ - -D_ANDROID -DRELEASE \ + -D_ANDROID -DNDEBUG \ -frename-registers -fsingle-precision-constant -ffast-math \ -ftree-vectorize -fomit-frame-pointer diff --git a/core/deps/picotcp/include/arch/pico_posix.h b/core/deps/picotcp/include/arch/pico_posix.h index de9bab022..4957a2511 100644 --- a/core/deps/picotcp/include/arch/pico_posix.h +++ b/core/deps/picotcp/include/arch/pico_posix.h @@ -16,7 +16,7 @@ #define TIME_PRESCALE #define PICO_SUPPORT_THREADING */ -#if defined(RELEASE) && !defined(DEBUGFAST) +#if defined(NDEBUG) && !defined(DEBUGFAST) #define dbg(...) #else #define dbg printf diff --git a/core/deps/xbrz/xbrz_config.h b/core/deps/xbrz/xbrz_config.h index 4995473b8..2bb1e631e 100644 --- a/core/deps/xbrz/xbrz_config.h +++ b/core/deps/xbrz/xbrz_config.h @@ -16,8 +16,6 @@ #ifndef XBRZ_CONFIG_HEADER_284578425345 #define XBRZ_CONFIG_HEADER_284578425345 -#define NDEBUG - //do NOT include any headers here! used by xBRZ_dll!!! namespace xbrz diff --git a/core/hw/aica/dsp_interp.cpp b/core/hw/aica/dsp_interp.cpp index 408c95d07..50b79c873 100644 --- a/core/hw/aica/dsp_interp.cpp +++ b/core/hw/aica/dsp_interp.cpp @@ -10,7 +10,7 @@ #if FEAT_DSPREC != DYNAREC_JIT -#ifdef RELEASE +#ifdef NDEBUG #undef verify #define verify(...) #endif diff --git a/core/hw/modem/modem.cpp b/core/hw/modem/modem.cpp index a4f970137..2032aa9cb 100644 --- a/core/hw/modem/modem.cpp +++ b/core/hw/modem/modem.cpp @@ -124,7 +124,7 @@ static void DSPTestEnd(); static u64 last_dial_time; static u64 connected_time; -#ifndef RELEASE +#ifndef NDEBUG static double last_comm_stats; static int sent_bytes; static int recvd_bytes; @@ -134,7 +134,7 @@ static FILE *sent_fp; static int modem_sched_func(int tag, int cycles, int jitter) { -#ifndef RELEASE +#ifndef NDEBUG if (os_GetSeconds() - last_comm_stats >= 2) { if (last_comm_stats != 0) @@ -272,7 +272,7 @@ static int modem_sched_func(int tag, int cycles, int jitter) break; case CONNECTED: -#ifndef RELEASE +#ifndef NDEBUG static bool mem_dumped; if (!mem_dumped) { @@ -290,7 +290,7 @@ static int modem_sched_func(int tag, int cycles, int jitter) if (c >= 0 && sh4_sched_now64() - connected_time >= SH4_MAIN_CLOCK / 4) { //LOG("pppd received %02x", c); -#ifndef RELEASE +#ifndef NDEBUG recvd_bytes++; #endif modem_regs.reg00 = c & 0xFF; @@ -460,7 +460,7 @@ static u8 download_crc; static void ModemNormalWrite(u32 reg, u32 data) { -#ifndef RELEASE +#ifndef NDEBUG if (recv_fp == NULL) { recv_fp = fopen("ppp_recv.dump", "w"); @@ -512,7 +512,7 @@ static void ModemNormalWrite(u32 reg, u32 data) else if (connect_state == CONNECTED && modem_regs.reg08.RTS) { //LOG("ModemNormalWrite : TBUFFER = %X", data); -#ifndef RELEASE +#ifndef NDEBUG sent_bytes++; if (sent_fp) fputc(data, sent_fp); @@ -676,7 +676,7 @@ u32 ModemReadMem_A0_006(u32 addr, u32 size) modem_regs.reg1e.RDBF = 0; SET_STATUS_BIT(0x0c, modem_regs.reg0c.RXFNE, 0); SET_STATUS_BIT(0x01, modem_regs.reg01.RXHF, 0); -#ifndef RELEASE +#ifndef NDEBUG if (connect_state == CONNECTED && recv_fp) fputc(data, recv_fp); #endif diff --git a/core/hw/pvr/ta_vtx.cpp b/core/hw/pvr/ta_vtx.cpp index 371249592..1f976cceb 100644 --- a/core/hw/pvr/ta_vtx.cpp +++ b/core/hw/pvr/ta_vtx.cpp @@ -14,7 +14,7 @@ u32 ta_type_lut[256]; extern int screen_height; #define TACALL DYNACALL -#ifdef RELEASE +#ifdef NDEBUG #undef verify #define verify(x) #endif diff --git a/core/log/Log.h b/core/log/Log.h index ec3aedb12..6610fbb45 100644 --- a/core/log/Log.h +++ b/core/log/Log.h @@ -54,7 +54,7 @@ __attribute__((format(printf, 5, 6))) #endif ; -#if !defined(RELEASE) || defined(DEBUGFAST) +#if !defined(NDEBUG) || defined(DEBUGFAST) #define MAX_LOGLEVEL LogTypes::LOG_LEVELS::LDEBUG #else #ifndef MAX_LOGLEVEL diff --git a/core/rend/vulkan/vmallocator.cpp b/core/rend/vulkan/vmallocator.cpp index 007c8f978..8f2ce9492 100644 --- a/core/rend/vulkan/vmallocator.cpp +++ b/core/rend/vulkan/vmallocator.cpp @@ -52,7 +52,7 @@ void VMAllocator::Init(vk::PhysicalDevice physicalDevice, vk::Device device) allocatorInfo.physicalDevice = (VkPhysicalDevice)physicalDevice; allocatorInfo.device = (VkDevice)device; -#if !defined(RELEASE) || defined(DEBUGFAST) +#if !defined(NDEBUG) || defined(DEBUGFAST) allocatorInfo.pDeviceMemoryCallbacks = &memoryCallbacks; #endif VkResult rc = vmaCreateAllocator(&allocatorInfo, &allocator); diff --git a/core/wsi/xgl.cpp b/core/wsi/xgl.cpp index c29de3745..eaed5d10b 100644 --- a/core/wsi/xgl.cpp +++ b/core/wsi/xgl.cpp @@ -47,7 +47,7 @@ bool XGLGraphicsContext::Init() { GLX_CONTEXT_MAJOR_VERSION_ARB, 4, GLX_CONTEXT_MINOR_VERSION_ARB, 3, -#ifndef RELEASE +#ifndef NDEBUG GLX_CONTEXT_FLAGS_ARB, GLX_CONTEXT_DEBUG_BIT_ARB, #endif GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_CORE_PROFILE_BIT_ARB, diff --git a/shell/apple/emulator-osx/reicast-osx.xcodeproj/project.pbxproj b/shell/apple/emulator-osx/reicast-osx.xcodeproj/project.pbxproj index 9d3ca7909..06e6df1f9 100644 --- a/shell/apple/emulator-osx/reicast-osx.xcodeproj/project.pbxproj +++ b/shell/apple/emulator-osx/reicast-osx.xcodeproj/project.pbxproj @@ -3097,7 +3097,7 @@ _7ZIP_ST, CHD5_FLAC, "HAVE_CONFIG_H=1", - RELEASE, + NDEBUG, "USE_SDL=1", XXH_INLINE_ALL, VK_USE_PLATFORM_MACOS_MVK, @@ -3414,7 +3414,7 @@ _7ZIP_ST, CHD5_FLAC, "HAVE_CONFIG_H=1", - RELEASE, + NDEBUG, XXH_INLINE_ALL, "${CFLAGS}", ); diff --git a/shell/cmake/CMakeLists.txt b/shell/cmake/CMakeLists.txt index 6ef80613d..e8bf3d773 100644 --- a/shell/cmake/CMakeLists.txt +++ b/shell/cmake/CMakeLists.txt @@ -42,10 +42,6 @@ else() set(arch "${CMAKE_SYSTEM_PROCESSOR}") endif() -if("${CMAKE_BUILD_TYPE}" STREQUAL Release) - add_definitions(-DRELEASE) -endif() - add_definitions(-DUSES_HOMEDIR) add_definitions(-DTARGET_NO_AREC) diff --git a/shell/linux/Makefile b/shell/linux/Makefile index 3307b6d48..de332b81c 100644 --- a/shell/linux/Makefile +++ b/shell/linux/Makefile @@ -294,7 +294,7 @@ include $(RZDCY_SRC_DIR)/core.mk LDFLAGS += -g -Wl,-Map,$(notdir $@).map,--gc-sections -Wl,-O3 -Wl,--sort-common -fopenmp -CFLAGS += $(RZDCY_CFLAGS) -g -O3 -D RELEASE -c -D USES_HOMEDIR -fopenmp #-D NO_REND +CFLAGS += $(RZDCY_CFLAGS) -g -O3 -D NDEBUG -c -D USES_HOMEDIR -fopenmp #-D NO_REND CFLAGS += -frename-registers -fno-strict-aliasing CFLAGS += -ffast-math -ftree-vectorize -Wno-unused-result