SRC_D = d1_freq.cpp d2_lemmings.cpp d3_arithmetic.cpp d4_relational.cpp SRC_E = e2_cartesian.cpp SRC_P = p1_area.cpp p2_rational.cpp p3_mountains.cpp p4_polar.cpp p5_numset.cpp p6_continued.cpp SRC_R = r1_poly.cpp r2_qsort.cpp r3_ttt.cpp r4_flight.cpp r5_qfield.cpp r6_life.cpp SRC_T = CXX = /packages/run.64/llvm-16.0.6/bin/clang++ TIDY = /packages/run.64/llvm-16.0.6/bin/clang-tidy VALGRIND = valgrind CXXFLAGS = -std=c++20 -Wall -Wextra -Werror TDYFLAGS = -std=c++20 -include ../local.mk BIN_T = ${SRC_T:.cpp=} BIN_D = ${SRC_D:.cpp=} BIN_E = ${SRC_E:.cpp=} BIN_P = ${SRC_P:.cpp=} BIN_R = ${SRC_R:.cpp=} BIN = $(BIN_T) $(BIN_D) $(BIN_E) $(BIN_P) $(BIN_R) SRC = $(SRC_T) $(SRC_D) $(SRC_E) $(SRC_P) $(SRC_R) DEP = ${BIN_D:%=.%.d} ${BIN_E:%=.%.d} ${BIN_T:%=.%.d} ${BIN_E:%=.sol.%.d} _ENV = CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" TDYFLAGS="$(TDYFLAGS)" TIDY="$(TIDY)" VALGRIND="$(VALGRIND)" all: $(BIN) clean: @rm -f $(BIN) $(DEP) @rm -f *.core core *~ a.out .check.*.out valgrind.out a.out .cpp: makefile .helper.sh @env $(_ENV) sh .helper.sh cxx $< -o $@ @env $(_ENV) sh .helper.sh tidy $< @env $(_ENV) sh .helper.sh grind ./$@ $(BIN_T): makefile .helper.sh @echo building and testing $@ @env $(_ENV) sh .helper.sh cxx $@.cpp -o $@ @env $(_ENV) sh .helper.sh tidy $@.cpp @env $(_ENV) sh .helper.sh grind ./$@ -include $(DEP) .PHONY: all clean