Makefile
This commit is contained in:
parent
02926e26ab
commit
fdf76df377
|
@ -29,20 +29,20 @@ ifeq ($(mode),)
|
|||
mode = debug
|
||||
endif
|
||||
ifeq ($(mode),debug)
|
||||
CFLAGS = -O0 -g -std=gnu99 -pedantic -Wextra -Wconversion
|
||||
LDFLAGS =
|
||||
CFLAGS := -O0 -g -std=gnu99 -pedantic -Wextra -Wconversion $(CFLAGS)
|
||||
LDFLAGS := $(LDFLAGS)
|
||||
endif
|
||||
ifeq ($(mode),profile)
|
||||
CFLAGS = -O0 -g -p -ftest-coverage -Wcoverage-mismatch
|
||||
LDFLAGS = -g -p
|
||||
CFLAGS := -O0 -g -p -ftest-coverage -Wcoverage-mismatch $(CFLAGS)
|
||||
LDFLAGS := -g -p $(LDFLAGS)
|
||||
endif
|
||||
ifeq ($(mode),develop)
|
||||
CFLAGS += -O2 -g
|
||||
LDFLAGS += -O1
|
||||
CFLAGS := -O2 -g $(CFLAGS)
|
||||
LDFLAGS := -O1 $(LDFLAGS)
|
||||
endif
|
||||
ifeq ($(mode),release)
|
||||
CFLAGS += -O2
|
||||
LDFLAGS += -O1
|
||||
CFLAGS := -O2 $(CFLAGS)
|
||||
LDFLAGS := -O1 $(LDFLAGS)
|
||||
endif
|
||||
|
||||
CFLAGS += -Wall
|
||||
|
@ -74,9 +74,9 @@ change_make_options:
|
|||
ifneq ($(mode)|$(CFLAGS)|$(LDFLAGS), $(OLD_BUILD_MODE)|$(OLD_BUILD_CFLAGS)|$(OLD_BUILD_LDFLAGS))
|
||||
@echo CLEANING...
|
||||
@make clean &>/dev/null
|
||||
@echo MODE=$(mode) > make_options.out
|
||||
@echo CFLAGS=$(CFLAGS) >> make_options.out
|
||||
@echo LDFLAGS=$(LDFLAGS) >> make_options.out
|
||||
@echo "MODE=$(mode)" > make_options.out
|
||||
@echo "CFLAGS=$(CFLAGS)" >> make_options.out
|
||||
@echo "LDFLAGS=$(LDFLAGS)" >> make_options.out
|
||||
endif
|
||||
|
||||
%.o :
|
||||
|
|
Loading…
Reference in New Issue