LR35902 linux makefile: make consistent with Z80/shared parts.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2017-11-30 14:35:52 +00:00
parent 11062607e6
commit 6dbb1e1c13

View File

@ -1,36 +1,7 @@
LIB = liblr35902.a
CXXFLAGS = -Wall -std=c++14 -pipe -I ../inc -I ../../inc
CXXFLAGS = -I ../inc -I ../../inc
CXXFILES = CharacterDefinition.cpp Disassembler.cpp Display.cpp GameBoyBus.cpp IoRegisters.cpp LR35902.cpp ObjectAttribute.cpp Profiler.cpp
CXXOBJECTS = $(CXXFILES:.cpp=.o)
SOURCES = $(CXXFILES)
OBJECTS = $(CXXOBJECTS)
PCH = stdafx.h.gch
all: opt
opt: CXXFLAGS += -DNDEBUG -march=native -O3 -flto
opt: $(LIB)
debug: CXXFLAGS += -g -D_DEBUG
debug: $(LIB)
coverage: CXXFLAGS += -g -D_DEBUG -fprofile-arcs -ftest-coverage
coverage: $(LIB)
$(PCH): stdafx.h
$(CXX) $(CXXFLAGS) -x c++-header $<
$(LIB): $(OBJECTS)
$(AR) $(ARFLAGS) $(LIB) $(OBJECTS)
%.o: %.cpp $(PCH)
$(CXX) $(CXXFLAGS) $< -c -o $@
.PHONY: clean
clean:
-rm -f $(LIB) $(OBJECTS) $(PCH)
include ../../lib_build.mk