Detect if CUnit is installed

This commit is contained in:
Nick Chambers 2022-07-10 16:26:44 -05:00
parent 9f4a7f2bd0
commit 7a3b55ced6
1 changed files with 4 additions and 1 deletions

View File

@ -26,9 +26,12 @@ bin/%.o: src/%.c | init
docs:
@printf "not implemented yet.\n" >&2
test: bin/libgargoyle.so bin/gargoyle-test
test: cunit bin/libgargoyle.so bin/gargoyle-test
bin/gargoyle-test
cunit:
if pkg-config cunit; then printf 'CUnit is installed\n'; else printf 'please install CUnit\n' >&2; exit 1; fi
bin/gargoyle-test: $(addprefix bin/test/,$(addsuffix .o,$(GARGOYLE_TEST_OBJS)))
cc $(LDFLAGS) -L bin -o $@ $^ -l gargoyle -l cunit -l m