EightBit/exe_build.mk
Adrian Conlon 870d7528ce Include full symbols in all linux builds.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2017-12-23 23:25:37 +00:00

41 lines
700 B
Makefile

CXXOBJECTS = $(CXXFILES:.cpp=.o)
LDFLAGS += -g
SOURCES = $(CXXFILES)
OBJECTS = $(CXXOBJECTS)
PCH = stdafx.h.gch
all: opt
opt: CXXFLAGS += $(CXXFLAGS_OPT)
opt: $(EXE)
debug: CXXFLAGS += $(CXXFLAGS_DEBUG)
debug: $(EXE)
coverage: CXXFLAGS += $(CXXFLAGS_COVERAGE)
coverage: LDFLAGS += -lgcov
coverage: $(EXE)
profile: CXXFLAGS += $(CXXFLAGS_PROFILE)
profile: LDFLAGS += -lgcov
profile: $(EXE)
profiled: CXXFLAGS += $(CXXFLAGS_PROFILED)
profiled: $(EXE)
$(PCH): stdafx.h
$(CXX) $(CXXFLAGS) -x c++-header $<
$(EXE): $(OBJECTS)
$(CXX) $(OBJECTS) -o $(EXE) $(LDFLAGS)
%.o: %.cpp $(PCH)
$(CXX) $(CXXFLAGS) $< -c -o $@
.PHONY: clean
clean:
-rm -f $(EXE) $(OBJECTS) $(PCH) *.gcov *.gcda *.gcno