DEFINES = -DTARGET_LPC1768 \r
\r
# Maximum optimization level\r
-OPTIMIZATION = 3\r
+OPTIMIZATION = 2\r
\r
# Compiler Options\r
-GCFLAGS = -O$(OPTIMIZATION) -gdwarf-2 -mcpu=cortex-m3 -mthumb -mthumb-interwork -mlong-calls -fshort-wchar -ffunction-sections -fdata-sections -fpromote-loop-indices -Wall -Wextra -Wimplicit -Wcast-align -Wpointer-arith -Wredundant-decls -Wshadow -Wcast-qual -Wcast-align -Wnested-externs --std=gnu99 \r
+GCFLAGS = -O$(OPTIMIZATION) -gdwarf-2 -mcpu=cortex-m3 -mthumb -mthumb-interwork -fshort-wchar -ffunction-sections -fdata-sections -fpromote-loop-indices -Wall -Wextra -Wimplicit -Wcast-align -Wpointer-arith -Wredundant-decls -Wshadow -Wcast-qual -Wcast-align -Wnested-externs --std=gnu99 \r
GCFLAGS += $(patsubst %,-I%,$(INCDIRS)) -I.\r
GCFLAGS += $(DEFINES)\r
\r
-GPFLAGS = -O$(OPTIMIZATION) -gdwarf-2 -mcpu=cortex-m3 -mthumb -mthumb-interwork -mlong-calls -fshort-wchar -ffunction-sections -fdata-sections -fpromote-loop-indices -Wall -Wextra -Wimplicit -Wcast-align -Wpointer-arith -Wredundant-decls -Wshadow -Wcast-qual -Wcast-align -fno-rtti -fno-exceptions\r
+GPFLAGS = -O$(OPTIMIZATION) -gdwarf-2 -mcpu=cortex-m3 -mthumb -mthumb-interwork -fshort-wchar -ffunction-sections -fdata-sections -fpromote-loop-indices -Wall -Wextra -Wimplicit -Wcast-align -Wpointer-arith -Wredundant-decls -Wshadow -Wcast-qual -Wcast-align -fno-exceptions\r
GPFLAGS += $(patsubst %,-I%,$(INCDIRS)) -I.\r
GPFLAGS += $(DEFINES)\r
\r
AR = arm-none-eabi-ar\r
OBJCOPY = arm-none-eabi-objcopy\r
OBJDUMP = arm-none-eabi-objdump\r
-REMOVE = cs-rm -f\r
SIZE = arm-none-eabi-size\r
+REMOVE = rm\r
+\r
+# Switch to cs-rm on Windows.\r
+ifeq "$(MAKE)" "cs-make"\r
+REMOVE = cs-rm\r
+endif\r
\r
#########################################################################\r
\r
$(AR) -rc $(PROJECT).ar $(OBJECTS)\r
\r
clean:\r
- $(REMOVE) $(OBJECTS)\r
- $(REMOVE) $(PROJECT).ar\r
+ $(REMOVE) -f $(OBJECTS)\r
+ $(REMOVE) -f $(PROJECT).ar\r
\r
#########################################################################\r
# Default rules to compile .c and .cpp file to .o\r