From 1b78d33ddc3e6a5b6a136110cc83b3513f84207b Mon Sep 17 00:00:00 2001 From: skarg Date: Wed, 13 May 2009 04:49:59 +0000 Subject: [PATCH] Added build option for Makefile (for optimized) --- bacnet-stack/ports/bdk-atxx4-mstp/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bacnet-stack/ports/bdk-atxx4-mstp/Makefile b/bacnet-stack/ports/bdk-atxx4-mstp/Makefile index 0734334a..9eea250c 100644 --- a/bacnet-stack/ports/bdk-atxx4-mstp/Makefile +++ b/bacnet-stack/ports/bdk-atxx4-mstp/Makefile @@ -121,14 +121,18 @@ LIBRARY = lib$(TARGET).a ## Options common to compile, link and assembly rules COMMON = -mmcu=$(MCU) +# define something from the Makefile or batch file +DEFINES = + OPTIMIZE_FLAGS = -mcall-prologues OPTIMIZE_FLAGS += -finline-functions-called-once # default optimization is for debugging from AVR Studio OPTIMIZATION = -O0 -#OPTIMIZATION = -Os $(OPTIMIZE_FLAGS) DEBUGGING = -g -# define something from the Makefile or batch file -DEFINES = +ifeq (${BUILD},release) +OPTIMIZATION = -Os $(OPTIMIZE_FLAGS) +DEBUGGING = +endif# ## Compile options common for all C compilation units. BFLAGS = -DBACDL_MSTP