From 794d0fa361ddee1c2d886848a0e3bc4abd6cbe84 Mon Sep 17 00:00:00 2001 From: "Adrian.Conlon" Date: Tue, 26 Sep 2017 22:59:21 +0100 Subject: [PATCH] First stab at GB -> linux Signed-off-by: Adrian.Conlon --- LR35902/src/Makefile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 LR35902/src/Makefile diff --git a/LR35902/src/Makefile b/LR35902/src/Makefile new file mode 100644 index 0000000..3c753fa --- /dev/null +++ b/LR35902/src/Makefile @@ -0,0 +1,36 @@ +LIB = liblr35902.a + +CXXFLAGS = -Wall -std=c++11 -pipe -I ../inc -I ../../inc + +CXXFILES = Disassembler.cpp Display.cpp GameBoyBus.cpp LR35902.cpp Profiler.cpp + +CXXOBJECTS = $(CXXFILES:.cpp=.o) + +SOURCES = $(CXXFILES) +OBJECTS = $(CXXOBJECTS) + +PCH = stdafx.h.gch + +all: opt + +opt: CXXFLAGS += -DNDEBUG -march=native -O2 +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)