--- a/Makefile.common
+++ b/Makefile.common
@@ -24,10 +24,10 @@
 endif
 
 ifeq ($(XMAIL_DEBUG), 1)
-    CFLAGS := $(CFLAGS) -O0 -g
+    CFLAGS := -O0 -g $(CFLAGS)
     STRIP = touch
 else
-    CFLAGS := $(CFLAGS) -O2
+    CFLAGS := -O2 $(CFLAGS)
 endif
 
 OUTDIR = bin
