mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2026-04-21 01:16:50 +00:00
Start sharing parts of the linux build system.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
+2
-32
@@ -1,37 +1,7 @@
|
||||
LIB = libeightbit.a
|
||||
|
||||
CXXFLAGS = -Wall -std=c++14 -pipe -I ../inc
|
||||
CXXFLAGS = -I ../inc
|
||||
|
||||
CXXFILES = Bus.cpp 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 -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
|
||||
|
||||
Reference in New Issue
Block a user