From 5be1b2873be6bcc60d7c08917fa9ba6849e1b910 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 12 Feb 2014 20:20:39 +0200 Subject: [PATCH] unix Makefile: Split off optimization options to COPT variable. To allow easily try different optimization and configuration options without patching any files. --- unix/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/unix/Makefile b/unix/Makefile index 1ce00eb28f..7bca495c26 100644 --- a/unix/Makefile +++ b/unix/Makefile @@ -11,7 +11,7 @@ QSTR_DEFS = qstrdefsport.h include ../py/py.mk # compiler settings -CFLAGS = -I. -I$(PY_SRC) -Wall -Werror -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) +CFLAGS = -I. -I$(PY_SRC) -Wall -Werror -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) LDFLAGS = $(LDFLAGS_MOD) -lm -Wl,-Map=$@.map,--cref ifeq ($(MICROPY_MOD_TIME),1) @@ -27,9 +27,10 @@ endif # Debugging/Optimization ifdef DEBUG -CFLAGS += -O0 -g +CFLAGS += -g +COPT = -O0 else -CFLAGS += -Os #-DNDEBUG +COPT = -Os #-DNDEBUG endif # source files