First stab at GB -> linux

Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
This commit is contained in:
Adrian.Conlon 2017-09-26 22:59:21 +01:00
parent 04b6835cf4
commit 794d0fa361

36
LR35902/src/Makefile Normal file
View File

@ -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)