mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-11-20 08:32:00 +00:00
033969bbe3
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
39 lines
685 B
Makefile
39 lines
685 B
Makefile
CXXOBJECTS = $(CXXFILES:.cpp=.o)
|
|
|
|
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
|