mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-08-15 10:27:26 +00:00
Linux build compatibility.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
@@ -114,7 +114,7 @@ void EightBit::GameBoy::Bus::validateCartridgeType() {
|
|||||||
default:
|
default:
|
||||||
if (romSizeSpecification > 6)
|
if (romSizeSpecification > 6)
|
||||||
throw std::domain_error("Invalid ROM size specification");
|
throw std::domain_error("Invalid ROM size specification");
|
||||||
gameRomBanks = 1i64 << (romSizeSpecification + 1);
|
gameRomBanks = 1 << (romSizeSpecification + 1);
|
||||||
if (gameRomBanks != m_gameRomBanks.size())
|
if (gameRomBanks != m_gameRomBanks.size())
|
||||||
throw std::domain_error("ROM size specification mismatch");
|
throw std::domain_error("ROM size specification mismatch");
|
||||||
}
|
}
|
||||||
|
@@ -1,36 +1,7 @@
|
|||||||
LIB = liblr35902.a
|
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
|
CXXFILES = CharacterDefinition.cpp Disassembler.cpp Display.cpp GameBoyBus.cpp IoRegisters.cpp LR35902.cpp ObjectAttribute.cpp Profiler.cpp
|
||||||
|
|
||||||
CXXOBJECTS = $(CXXFILES:.cpp=.o)
|
include ../../lib_build.mk
|
||||||
|
|
||||||
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)
|
|
||||||
|
Reference in New Issue
Block a user