diff --git a/Makefile.arm9 b/Makefile.arm9 index 09faf88..64a86e6 100644 --- a/Makefile.arm9 +++ b/Makefile.arm9 @@ -27,6 +27,10 @@ #--------------------------------------------------------------------------------- DEFINES := +ifneq ($(strip $(NO_DEBUG)),) + DEFINES := $(DEFINES) -DNDEBUG +endif + LDNAME := arm9.ld ARCH := -march=armv5te -mtune=arm946e-s -mfloat-abi=soft -marm -mthumb-interwork diff --git a/build_public.bat b/build_public.bat new file mode 100644 index 0000000..0a74c7b --- /dev/null +++ b/build_public.bat @@ -0,0 +1,2 @@ +make NO_DEBUG=1 +pause diff --git a/build_redo_public.bat b/build_redo_public.bat new file mode 100644 index 0000000..f50e6fd --- /dev/null +++ b/build_redo_public.bat @@ -0,0 +1,3 @@ +make clean +make NO_DEBUG=1 +pause diff --git a/source/arm9/debug.c b/source/arm9/debug.c index a237440..dde06c5 100644 --- a/source/arm9/debug.c +++ b/source/arm9/debug.c @@ -13,6 +13,7 @@ void hashCodeRoData() { +#ifndef NDEBUG extern u32 *__start__; extern u32 *__exidx_start; @@ -23,6 +24,7 @@ for(u32 *ptr = start; ptr < end; ptr++) debugHash += *ptr; +#endif } noreturn void panic()