Codeforces/.common/cpp/makefile
Matej Focko 9e5f237dfd
chore(cpp): build catch2 only in common directory
Signed-off-by: Matej Focko <me@mfocko.xyz>
2023-07-10 11:32:16 +02:00

13 lines
383 B
Makefile

CXX=clang++
CXXFLAGS=-std=c++20 -Wall -Wextra
COMMON_PATH=../.common/cpp
$(COMMON_PATH)/catch2.o: $(COMMON_PATH)/catch_amalgamated.cpp $(COMMON_PATH)/catch_amalgamated.hpp
$(CXX) $(CXXFLAGS) -g -c $(COMMON_PATH)/catch_amalgamated.cpp -o $(COMMON_PATH)/catch2.o
%: $(COMMON_PATH)/catch2.o %.cpp
$(CXX) $(CXXFLAGS) -DTEST -g $^ -o $@
format:
clang-format -i -style=google *.cpp