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}