mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-12-23 00:29:47 +00:00
df1f47fb36
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
30 lines
705 B
Makefile
30 lines
705 B
Makefile
CXXFLAGS += -g -Wall -std=c++14 -pipe
|
|
|
|
CXXFLAGS_OPT = -DNDEBUG -march=native -Ofast -flto
|
|
CXXFLAGS_DEBUG = -D_DEBUG
|
|
CXXFLAGS_COVERAGE = $(CXXFLAGS_DEBUG) -fprofile-arcs -ftest-coverage
|
|
|
|
CXXFLAGS_PROFILE = $(CXXFLAGS_OPT) -fprofile-generate
|
|
CXXFLAGS_PROFILED = $(CXXFLAGS_OPT) -fprofile-use
|
|
|
|
CXXOBJECTS = $(CXXFILES:.cpp=.o)
|
|
|
|
SOURCES = $(CXXFILES)
|
|
OBJECTS = $(CXXOBJECTS)
|
|
|
|
PCH = stdafx.h.gch
|
|
|
|
all: opt
|
|
|
|
opt: CXXFLAGS += $(CXXFLAGS_OPT)
|
|
debug: CXXFLAGS += $(CXXFLAGS_DEBUG)
|
|
coverage: CXXFLAGS += $(CXXFLAGS_COVERAGE)
|
|
profile: CXXFLAGS += $(CXXFLAGS_PROFILE)
|
|
profiled: CXXFLAGS += $(CXXFLAGS_PROFILED)
|
|
|
|
$(PCH): stdafx.h
|
|
$(CXX) $(CXXFLAGS) -x c++-header $<
|
|
|
|
%.o: %.cpp $(PCH)
|
|
$(CXX) $(CXXFLAGS) $< -c -o $@
|