EightBit/exe_build.mk
Adrian Conlon c48a91216e Tidy up linux link-time optimisation flags.
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
2020-06-07 12:33:19 +01:00

22 lines
438 B
Makefile

LDFLAGS += -g
LDFLAGS_OPT = -flto
LDFLAGS_COVERAGE = -lgcov
LDFLAGS_PROFILE = $(LDFLAGS_COVERAGE) $(LDFLAGS_OPT)
opt: LDFLAGS += $(LDFLAGS_OPT)
opt: $(EXE)
debug: $(EXE)
coverage: LDFLAGS += $(LDFLAGS_COVERAGE)
coverage: $(EXE)
profile: LDFLAGS += $(LDFLAGS_PROFILE)
profile: $(EXE)
profiled: $(EXE)
$(EXE): $(OBJECTS)
$(CXX) $(OBJECTS) -o $(EXE) $(LDFLAGS)
.PHONY: clean
clean:
-rm -f $(EXE) $(OBJECTS) $(PCH) *.gcov *.gcda *.gcno