feat: add check targets

This commit is contained in:
Nemo D'ACREMONT 2025-03-14 19:13:19 +01:00
parent ed2fe3454b
commit e61a82c617
No known key found for this signature in database
GPG Key ID: 85F245EC3BB1E022

View File

@ -26,6 +26,9 @@ install_bins_targets=$(addprefix ${install_dir}/bin/,${bins})
valgrind_targets=$(addprefix valgrind_,${bins})
check_argv?=8 255
check_targets=$(addprefix check_,${bins})
src_dirs=$(sort $(dir $(wildcard ${src_dir}/**/)))
includes=$(patsubst %,-I%,${src_dirs})
@ -78,8 +81,11 @@ pthreads:
touch .lastpthread
.PHONY: check
check:
true
check: ${check_targets}
.PHONY: ${check_targets}
${check_targets}: check_%: ${build_dir}/%
$^ ${check_argv}
${bins_target}: ${build_dir}/%: ${objs} ${build_dir}/${tst_dir}/%.o
${CC} -o $@ $^ ${CFLAGS} ${LDFLAGS}