spdlog/tests/Makefile

23 lines
386 B
Makefile
Raw Normal View History

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