Makefile (597B)
1 CXX = g++ 2 CXXFLAGS = -g -O0 -fopenmp 3 .PHONY: clean 4 5 # Since GCC 4.8 (LLVM clang also supports this) you can use the 6 # -fsanitize=thread option to check if there are race conditions detected. But 7 # be aware the tool is not perfect but can be helpful when hunting bugs! See 8 # this link for more info: 9 # https://clang.llvm.org/docs/ThreadSanitizer.html 10 11 all: main sanitized 12 13 main: two_ompthreads.cpp 14 $(CXX) $(CXXFLAGS) -o $@ $< 15 16 sanitized: two_ompthreads.cpp 17 $(CXX) $(CXXFLAGS) -fsanitize=thread -o $@ $< 18 19 asm: two_ompthreads.cpp 20 $(CXX) $(CXXFLAGS) -S -o $@ $< 21 22 clean: 23 rm -f main sanitized asm