2015-05-15 13:30:37 -04:00
|
|
|
CXX ?= g++
|
2015-05-15 15:54:07 -04:00
|
|
|
CXXFLAGS = -Wall -pedantic -std=c++11 -pthread -O2
|
|
|
|
LDPFALGS = -pthread
|
2015-05-15 13:48:38 -04:00
|
|
|
|
|
|
|
CPP_FILES := $(wildcard *.cpp)
|
|
|
|
OBJ_FILES := $(addprefix ./,$(notdir $(CPP_FILES:.cpp=.o)))
|
|
|
|
|
|
|
|
|
|
|
|
tests: $(OBJ_FILES)
|
|
|
|
$(CXX) $(CXXFLAGS) $(LDPFALGS) -o $@ $^
|
|
|
|
|
|
|
|
%.o: %.cpp
|
2015-05-15 15:54:07 -04:00
|
|
|
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
2015-05-15 13:30:37 -04:00
|
|
|
|
|
|
|
clean:
|
2015-05-15 13:48:38 -04:00
|
|
|
rm -f tests *.o logs/*
|
2015-05-15 13:30:37 -04:00
|
|
|
|
2015-05-15 13:54:01 -04:00
|
|
|
rebuild: clean tests
|
2015-05-15 13:30:37 -04:00
|
|
|
|
|
|
|
|
|
|
|
|