summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/Makefile b/src/Makefile
index 61012ea68..13f80b694 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -19,12 +19,19 @@ OBJS := $(OBJ1) $(OBJ2) $(OBJ3)
# libraries, includes
INCLUDES = -I$(BASEDIR) -I$(BASEDIR)/../include
-DEBUG_MODE = 1
-ifeq ($(DEBUG_MODE),1)
-CFLAGS = -g -O3
-else
-CFLAGS = -O3
+ifeq ($(strip $(COMPILE_MODE)),)
+ # default compile option
+ COMPILE_MODE = debug
endif
+
+ifeq ($(COMPILE_MODE),debug)
+ CFLAGS = -g -O3
+else ifeq ($(COMPILE_MODE),release)
+ CFLAGS = -O3
+else ifeq ($(COMPILE_MODE),small)
+ CFLAGS = -Os
+endif
+
ALL_CFLAGS = -Wall -Werror-implicit-function-declaration $(CFLAGS)