Index: Makefile
===================================================================
--- Makefile	(revision e2ec980f093ea2fc11c69070440d9e6f74ebfae4)
+++ Makefile	(revision b183865e99c534b42e7e5de6db9c93b351693c93)
@@ -63,6 +63,6 @@
 include genarch/Makefile.inc
 
-ifeq ($(CONFIG_DEBUG),n)
-	DEFS += -DNDEBUG
+ifeq ($(CONFIG_DEBUG),y)
+	DEFS += -DCONFIG_DEBUG
 endif
 ifeq ($(CONFIG_DEBUG_SPINLOCK),y)
Index: Makefile.config
===================================================================
--- Makefile.config	(revision e2ec980f093ea2fc11c69070440d9e6f74ebfae4)
+++ Makefile.config	(revision b183865e99c534b42e7e5de6db9c93b351693c93)
@@ -24,5 +24,5 @@
 #
 
-CONFIG_DEBUG = n
+CONFIG_DEBUG = y
 CONFIG_DEBUG_SPINLOCK = y
 
Index: generic/include/debug.h
===================================================================
--- generic/include/debug.h	(revision e2ec980f093ea2fc11c69070440d9e6f74ebfae4)
+++ generic/include/debug.h	(revision b183865e99c534b42e7e5de6db9c93b351693c93)
@@ -35,5 +35,5 @@
 /** Debugging ASSERT macro
  *
- * If NDEBUG is not set, the ASSERT() macro
+ * If CONFIG_DEBUG is set, the ASSERT() macro
  * evaluates expr and if it is false raises
  * kernel panic.
@@ -42,5 +42,5 @@
  *
  */
-#ifndef NDEBUG
+#ifdef CONFIG_DEBUG
 #	define ASSERT(expr) if (!(expr)) { panic("assertion failed (%s)", #expr); }
 #else
Index: generic/include/panic.h
===================================================================
--- generic/include/panic.h	(revision e2ec980f093ea2fc11c69070440d9e6f74ebfae4)
+++ generic/include/panic.h	(revision b183865e99c534b42e7e5de6db9c93b351693c93)
@@ -30,5 +30,5 @@
 #define __PANIC_H__
 
-#ifndef NDEBUG
+#ifdef CONFIG_DEBUG
 #	define panic(format, ...) panic_printf("Kernel panic in %s() at %s on line %d: " format, __FUNCTION__, __FILE__, __LINE__, ##__VA_ARGS__);
 #else
