Makefile
This commit is contained in:
parent
02926e26ab
commit
fdf76df377
|
@ -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 :
|
||||||
|
|
Loading…
Reference in New Issue