This commit is contained in:
Kolan Sh 2011-07-12 12:57:00 +04:00
parent 02926e26ab
commit fdf76df377
1 changed files with 11 additions and 11 deletions

View File

@ -29,20 +29,20 @@ ifeq ($(mode),)
mode = debug mode = debug
endif endif
ifeq ($(mode),debug) ifeq ($(mode),debug)
CFLAGS = -O0 -g -std=gnu99 -pedantic -Wextra -Wconversion CFLAGS := -O0 -g -std=gnu99 -pedantic -Wextra -Wconversion $(CFLAGS)
LDFLAGS = LDFLAGS := $(LDFLAGS)
endif endif
ifeq ($(mode),profile) ifeq ($(mode),profile)
CFLAGS = -O0 -g -p -ftest-coverage -Wcoverage-mismatch CFLAGS := -O0 -g -p -ftest-coverage -Wcoverage-mismatch $(CFLAGS)
LDFLAGS = -g -p LDFLAGS := -g -p $(LDFLAGS)
endif endif
ifeq ($(mode),develop) ifeq ($(mode),develop)
CFLAGS += -O2 -g CFLAGS := -O2 -g $(CFLAGS)
LDFLAGS += -O1 LDFLAGS := -O1 $(LDFLAGS)
endif endif
ifeq ($(mode),release) ifeq ($(mode),release)
CFLAGS += -O2 CFLAGS := -O2 $(CFLAGS)
LDFLAGS += -O1 LDFLAGS := -O1 $(LDFLAGS)
endif endif
CFLAGS += -Wall CFLAGS += -Wall
@ -74,9 +74,9 @@ change_make_options:
ifneq ($(mode)|$(CFLAGS)|$(LDFLAGS), $(OLD_BUILD_MODE)|$(OLD_BUILD_CFLAGS)|$(OLD_BUILD_LDFLAGS)) ifneq ($(mode)|$(CFLAGS)|$(LDFLAGS), $(OLD_BUILD_MODE)|$(OLD_BUILD_CFLAGS)|$(OLD_BUILD_LDFLAGS))
@echo CLEANING... @echo CLEANING...
@make clean &>/dev/null @make clean &>/dev/null
@echo MODE=$(mode) > make_options.out @echo "MODE=$(mode)" > make_options.out
@echo CFLAGS=$(CFLAGS) >> make_options.out @echo "CFLAGS=$(CFLAGS)" >> make_options.out
@echo LDFLAGS=$(LDFLAGS) >> make_options.out @echo "LDFLAGS=$(LDFLAGS)" >> make_options.out
endif endif
%.o : %.o :