Merge pull request #279 from pfalcon/make-copt

unix Makefile: Split off optimization options to COPT variable.
This commit is contained in:
Damien George 2014-02-12 20:53:00 +00:00
commit 648d9e6447
1 changed files with 4 additions and 3 deletions

View File

@ -11,7 +11,7 @@ QSTR_DEFS = qstrdefsport.h
include ../py/py.mk include ../py/py.mk
# compiler settings # 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 LDFLAGS = $(LDFLAGS_MOD) -lm -Wl,-Map=$@.map,--cref
ifeq ($(MICROPY_MOD_TIME),1) ifeq ($(MICROPY_MOD_TIME),1)
@ -27,9 +27,10 @@ endif
# Debugging/Optimization # Debugging/Optimization
ifdef DEBUG ifdef DEBUG
CFLAGS += -O0 -g CFLAGS += -g
COPT = -O0
else else
CFLAGS += -Os #-DNDEBUG COPT = -Os #-DNDEBUG
endif endif
# source files # source files