SRC_D = d1_newest.c d2_depth.c d3_refs.c d4_rewrite.c SRC_E = SRC_P = p1_fcount.c p2_access.c p3_list.c p4_archive.c p5_find.c p6_du.c SRC_R = r1_rcount.c r2_unique.c r3_loop.c r4_buckets.c r5_prune.c r6_top.c SRC_T = CC = /packages/run.64/llvm-18.1.2/bin/clang CXX = /packages/run.64/llvm-18.1.2/bin/clang++ VALGRIND = valgrind CFLAGS = -g -std=c99 -Wall -Wextra -Werror -MD -MP -include ../local.mk BIN_T = ${SRC_T:.c=} BIN_D = ${SRC_D:.c=} BIN_E = ${SRC_E:.c=} BIN_P = ${SRC_P:.c=} BIN_R = ${SRC_R:.c=} 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} PB152 = "-Dmain(...)=_pub_main_()" pb152.o pb152io.o -lstdc++ -lsupc++ -lm _ENV = CC="$(CC)" CFLAGS="$(CFLAGS)" VALGRIND="$(VALGRIND)" all: $(BIN) pb152.o: pb152.cpp $(CXX) -w -g -std=c++20 -c pb152.cpp pb152io.o: pb152io.c $(CC) -w -g -c pb152io.c clean: @rm -f $(BIN) $(DEP) @rm -f *.core core *~ a.out .check.*.out .valgrind.*.out.* a.out $(BIN): makefile .helper.sh pb152.o pb152io.o .c: @env $(_ENV) sh .helper.sh cc $< -o $@ -MF ${@:%=.%.d} $(PB152) @env $(_ENV) sh .helper.sh run $@ $(BIN_T): @echo building and testing $@ @env $(_ENV) sh .helper.sh cc $@.c -o $@ -MF ${@:%=.%.d} $(PB152) @env $(_ENV) sh .helper.sh run $@ -include $(DEP) .PHONY: all clean