From e61a82c6170df1efea059963376511ee5140ab0e Mon Sep 17 00:00:00 2001 From: Nemo D'ACREMONT Date: Fri, 14 Mar 2025 19:13:19 +0100 Subject: [PATCH] feat: add check targets --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index bb69cfc..71cc781 100644 --- a/Makefile +++ b/Makefile @@ -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}