Don't add optimization flag if one already exists.
This commit is contained in:
parent
d5e6f91389
commit
aec2f83f86
1 changed files with 5 additions and 1 deletions
|
@ -45,7 +45,11 @@ OBJECT_FILES := $(foreach dir,$(SOURCE_DIRS), \
|
|||
OUTPUT_ZIP_FILE := $(OUTPUT_DIR)/$(STRIPPED_NAME).zip
|
||||
|
||||
LD_FLAGS := $(patsubst %,-L%/lib,$(LIBRARY_DIRS)) $(patsubst %,-l%,$(LIBRARIES))
|
||||
COMMON_CC_FLAGS := $(sort $(foreach dir,$(SOURCE_DIRS),$(patsubst %,-I$(BUILD_DIR)/%,$(dir $(call rwildcard,$(dir),*))))) $(patsubst %,-I%,$(INCLUDE_DIRS)) $(patsubst %,-I%/include,$(LIBRARY_DIRS)) -g -Wall -O2 $(BUILD_FLAGS)
|
||||
COMMON_CC_FLAGS := $(sort $(foreach dir,$(SOURCE_DIRS),$(patsubst %,-I$(BUILD_DIR)/%,$(dir $(call rwildcard,$(dir),*))))) $(patsubst %,-I%,$(INCLUDE_DIRS)) $(patsubst %,-I%/include,$(LIBRARY_DIRS)) -g -Wall $(BUILD_FLAGS)
|
||||
|
||||
ifeq ($(findstring -O,$(BUILD_FLAGS)),)
|
||||
COMMON_CC_FLAGS += -O2
|
||||
endif
|
||||
|
||||
# COMMON LIBRARY SETUP #
|
||||
|
||||
|
|
Loading…
Reference in a new issue