CXX = clang++ CXXFLAGS = -march=native -Wall -Wextra -Wshadow -pedantic -std=c++11 -pthread -I../include CXX_RELEASE_FLAGS = -O2 CXX_DEBUG_FLAGS= -g BIN_PATH = bin/ DEBUG_PATH = $(BIN_PATH)debug/ all: basic_log-clang.exe daily_log-clang.exe rotating_log-clang.exe console_log-clang.exe bench-clang.exe debug: console_log-debug-clang.exe basic_log-debug-clang.exe daily_log-debug-clang.exe rotating_log-debug-clang.exe bench-debug-clang.exe basic_log-clang.exe: basic_log.cpp $(CXX) $^ -o $(BIN_PATH)$@ $(CXXFLAGS) $(CXX_RELEASE_FLAGS) daily_log-clang.exe: daily_log.cpp $(CXX) $^ -o $(BIN_PATH)$@ $(CXXFLAGS) $(CXX_RELEASE_FLAGS) rotating_log-clang.exe: rotating_log.cpp $(CXX) $^ -o $(BIN_PATH)$@ $(CXXFLAGS) $(CXX_RELEASE_FLAGS) console_log-clang.exe: console_log.cpp $(CXX) $^ -o $(BIN_PATH)$@ $(CXXFLAGS) $(CXX_RELEASE_FLAGS) bench-clang.exe: bench.cpp $(CXX) $^ -o $(BIN_PATH)$@ $(CXXFLAGS) $(CXX_RELEASE_FLAGS) basic_log-debug-clang.exe: basic_log.cpp $(CXX) $^ -o $(DEBUG_PATH)$@ $(CXXFLAGS) $(CXX_DEBUG_FLAGS) daily_log-debug-clang.exe: daily_log.cpp $(CXX) $^ -o $(DEBUG_PATH)$@ $(CXXFLAGS) $(CXX_DEBUG_FLAGS) rotating_log-debug-clang.exe: rotating_log.cpp $(CXX) $^ -o $(DEBUG_PATH)$@ $(CXXFLAGS) $(CXX_DEBUG_FLAGS) console_log-debug-clang.exe: console_log.cpp $(CXX) $^ -o $(DEBUG_PATH)$@ $(CXXFLAGS) $(CXX_DEBUG_FLAGS) bench-clang-debug.exe: bench.cpp $(CXX) $^ -o $(DEBUG_PATH)$@ $(CXXFLAGS) $(CXX_DEBUG_FLAGS) clean: rm -f *.o $(BIN_PATH)logs/* $(DEBUG_PATH)logs/* $(BIN_PATH)*.exe $(DEBUG_PATH)*-debug.exe rebuild: clean all rebuild-debug: clean debug