1
0
Fork 0
maximum-weight-matching/cpp/Makefile

33 lines
1.0 KiB
Makefile
Raw Normal View History

2023-05-10 20:56:30 +02:00
CXX = g++
2023-05-12 20:51:49 +02:00
OPTFLAGS = -O2
DBGFLAGS =
CXXFLAGS = -std=c++11 -Wall -Wextra $(OPTFLAGS) $(DBGFLAGS)
LIB_BOOST_TEST = -l:libboost_unit_test_framework.a
2023-05-10 20:56:30 +02:00
2023-05-12 20:51:49 +02:00
.PHONY: all
all: run_matching run_matching_dbg test_mwmatching
run_matching: run_matching.cpp mwmatching.h
$(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.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $<
test_mwmatching: OPTFLAGS = -O1
test_mwmatching: DBGFLAGS = -fsanitize=address -fsanitize=undefined
2023-05-10 20:56:30 +02:00
test_mwmatching: test_mwmatching.cpp mwmatching.h
2023-05-12 20:51:49 +02:00
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $< $(LIB_BOOST_TEST)
2023-05-10 20:56:30 +02:00
2023-06-16 19:55:43 +02:00
test_datastruct: OPTFLAGS = -O1
test_datastruct: DBGFLAGS = -fsanitize=address -fsanitize=undefined
test_datastruct: test_datastruct.cpp datastruct.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $< $(LIB_BOOST_TEST)
2023-05-10 20:56:30 +02:00
.PHONY: clean
clean:
2023-05-12 20:51:49 +02:00
$(RM) run_matching run_matching_dbg test_mwmatching
2023-05-10 20:56:30 +02:00