2016-04-02 19:14:54 -04:00
|
|
|
CXX ?= g++
|
2017-10-05 07:20:21 -04:00
|
|
|
ifeq ($(STYLE),printf)
|
|
|
|
$(info *** PRINTF STYLE ***)
|
2018-02-23 07:29:14 -05:00
|
|
|
CXXFLAGS = -DSPDLOG_FMT_PRINTF -Wall -pedantic -std=c++11 -pthread -O3 -I../include
|
2017-10-05 07:20:21 -04:00
|
|
|
else
|
|
|
|
$(info *** FORMAT STYLE ***)
|
2018-02-23 07:29:14 -05:00
|
|
|
CXXFLAGS = -Wall -pedantic -std=c++11 -pthread -O3 -I../include
|
2017-10-05 07:20:21 -04:00
|
|
|
endif
|
2016-04-02 19:14:54 -04:00
|
|
|
LDPFALGS = -pthread
|
|
|
|
|
|
|
|
CPP_FILES := $(wildcard *.cpp)
|
|
|
|
OBJ_FILES := $(addprefix ./,$(notdir $(CPP_FILES:.cpp=.o)))
|
|
|
|
|
|
|
|
|
|
|
|
tests: $(OBJ_FILES)
|
|
|
|
$(CXX) $(CXXFLAGS) $(LDPFALGS) -o $@ $^
|
|
|
|
mkdir -p logs
|
|
|
|
|
|
|
|
%.o: %.cpp
|
|
|
|
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f tests *.o logs/*.txt
|
|
|
|
|
|
|
|
rebuild: clean tests
|
|
|
|
|
|
|
|
|
|
|
|
|