2017-12-23 23:25:37 +00:00
|
|
|
LDFLAGS += -g
|
|
|
|
|
2020-06-07 11:33:19 +00:00
|
|
|
LDFLAGS_OPT = -flto
|
|
|
|
LDFLAGS_COVERAGE = -lgcov
|
|
|
|
LDFLAGS_PROFILE = $(LDFLAGS_COVERAGE) $(LDFLAGS_OPT)
|
|
|
|
|
|
|
|
opt: LDFLAGS += $(LDFLAGS_OPT)
|
2017-11-26 22:10:17 +00:00
|
|
|
opt: $(EXE)
|
|
|
|
debug: $(EXE)
|
2020-06-07 11:33:19 +00:00
|
|
|
coverage: LDFLAGS += $(LDFLAGS_COVERAGE)
|
2017-11-26 22:10:17 +00:00
|
|
|
coverage: $(EXE)
|
2020-06-07 11:33:19 +00:00
|
|
|
profile: LDFLAGS += $(LDFLAGS_PROFILE)
|
2017-11-30 14:59:24 +00:00
|
|
|
profile: $(EXE)
|
|
|
|
profiled: $(EXE)
|
|
|
|
|
2017-11-26 22:10:17 +00:00
|
|
|
$(EXE): $(OBJECTS)
|
|
|
|
$(CXX) $(OBJECTS) -o $(EXE) $(LDFLAGS)
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
-rm -f $(EXE) $(OBJECTS) $(PCH) *.gcov *.gcda *.gcno
|