From befcda2c0e4f55353ed3cd80f1cb0be9df7dc0bd Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Mon, 27 Nov 2017 21:33:23 +0000 Subject: [PATCH] Linux build compatibility. Signed-off-by: Adrian Conlon --- LR35902/src/GameBoyBus.cpp | 2 +- LR35902/src/Makefile | 33 ++------------------------------- 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/LR35902/src/GameBoyBus.cpp b/LR35902/src/GameBoyBus.cpp index e039a14..11b66c9 100644 --- a/LR35902/src/GameBoyBus.cpp +++ b/LR35902/src/GameBoyBus.cpp @@ -114,7 +114,7 @@ void EightBit::GameBoy::Bus::validateCartridgeType() { default: if (romSizeSpecification > 6) throw std::domain_error("Invalid ROM size specification"); - gameRomBanks = 1i64 << (romSizeSpecification + 1); + gameRomBanks = 1 << (romSizeSpecification + 1); if (gameRomBanks != m_gameRomBanks.size()) throw std::domain_error("ROM size specification mismatch"); } diff --git a/LR35902/src/Makefile b/LR35902/src/Makefile index ef4d339..11e46e1 100644 --- a/LR35902/src/Makefile +++ b/LR35902/src/Makefile @@ -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