diff --git a/examples/Makefile.rules b/examples/Makefile.rules index 8fc56ff..3157bc1 100644 --- a/examples/Makefile.rules +++ b/examples/Makefile.rules @@ -42,6 +42,7 @@ STFLASH = $(shell which st-flash) STYLECHECK := /checkpatch.pl STYLECHECKFLAGS := --no-tree -f --terse --mailback STYLECHECKFILES := $(shell find . -name '*.[ch]') +OPT := -Os ############################################################################### @@ -78,7 +79,7 @@ SCRIPT_DIR = $(OPENCM3_DIR)/scripts ############################################################################### # C flags -CFLAGS += -Os -g +CFLAGS += $(OPT) -g CFLAGS += -Wextra -Wshadow -Wimplicit-function-declaration CFLAGS += -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes CFLAGS += -fno-common -ffunction-sections -fdata-sections @@ -86,7 +87,7 @@ CFLAGS += -fno-common -ffunction-sections -fdata-sections ############################################################################### # C++ flags -CXXFLAGS += -Os -g +CXXFLAGS += $(OPT) -g CXXFLAGS += -Wextra -Wshadow -Wredundant-decls -Weffc++ CXXFLAGS += -fno-common -ffunction-sections -fdata-sections