-fno-inline-small-functions \
-fno-indirect-inlining
-CFLAGS := -std=gnu99 -ffreestanding $(O) $(OFLAGS) $(W) $(ARCH_OPT)
+CFLAGS := -std=gnu99 -ffreestanding $(OFLAGS) $(W) $(ARCH_OPT)
+
+ifeq ($(BUILD_MODE),debug)
+ O = -Og
+ CFLAGS += -g
+endif
+
+CFLAGS += $(O)
+
LDFLAGS := -ffreestanding $(O) -nostdlib -lgcc
MKFLAGS := --no-print-directory
\ No newline at end of file