From 6f8cf74c36a8500f81559c27a412992ab42f44d6 Mon Sep 17 00:00:00 2001 From: "Adrian.Conlon" Date: Sun, 3 Sep 2017 12:11:47 +0100 Subject: [PATCH] Add linux makefiles for parts of the EightBit library Signed-off-by: Adrian.Conlon --- Intel8080/src/Makefile | 36 ++++++++++++++++++++++++++++++++++++ src/Makefile | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 Intel8080/src/Makefile create mode 100644 src/Makefile diff --git a/Intel8080/src/Makefile b/Intel8080/src/Makefile new file mode 100644 index 0000000..6cb4942 --- /dev/null +++ b/Intel8080/src/Makefile @@ -0,0 +1,36 @@ +LIB = libEightBit.a + +CXXFLAGS = -Wall -std=c++11 -pipe -I ../inc + +CXXFILES = EventArgs.cpp InputOutput.cpp IntelProcessor.cpp Memory.cpp Processor.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) diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000..592ebf2 --- /dev/null +++ b/src/Makefile @@ -0,0 +1,35 @@ +CXXFLAGS = -Wall -std=c++11 -pipe -I ../inc + +CXXFILES = EventArgs.cpp InputOutput.cpp IntelProcessor.cpp Memory.cpp Processor.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) +