CXX = g++ OPTFLAGS = -O2 DBGFLAGS = CXXFLAGS = -std=c++11 -Wall -Wextra $(OPTFLAGS) $(DBGFLAGS) LIB_BOOST_TEST = -l:libboost_unit_test_framework.a .PHONY: all all: run_matching run_matching_dbg test_mwmatching test_concatenable_queue test_priority_queue run_matching: run_matching.cpp mwmatching.hpp concatenable_queue.hpp priority_queue.hpp $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $< run_matching_dbg: OPTFLAGS = -Og run_matching_dbg: DBGFLAGS = -g -fsanitize=address -fsanitize=undefined run_matching_dbg: run_matching.cpp mwmatching.hpp concatenable_queue.hpp priority_queue.hpp $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $< test_mwmatching: OPTFLAGS = -O1 test_mwmatching: DBGFLAGS = -fsanitize=address -fsanitize=undefined test_mwmatching: test_mwmatching.cpp mwmatching.hpp concatenable_queue.hpp priority_queue.hpp $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $< $(LIB_BOOST_TEST) test_concatenable_queue: OPTFLAGS = -O1 test_concatenable_queue: DBGFLAGS = -fsanitize=address -fsanitize=undefined test_concatenable_queue: test_concatenable_queue.cpp concatenable_queue.hpp $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $< $(LIB_BOOST_TEST) test_priority_queue: OPTFLAGS = -O1 test_priority_queue: DBGFLAGS = -fsanitize=address -fsanitize=undefined test_priority_queue: test_priority_queue.cpp priority_queue.hpp $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $< $(LIB_BOOST_TEST) .PHONY: clean clean: $(RM) run_matching run_matching_dbg $(RM) test_mwmatching $(RM) test_concatenable_queue test_priority_queue