Add a tst_binaries target to the parser to build tst binaries

This allows building the tst_* binaries in parallel independently of running the parser test suite

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
This commit is contained in:
Ryan Lee 2024-10-17 14:20:42 -07:00
parent 88287d4eec
commit 2e841655cf

View file

@ -365,6 +365,9 @@ cap_names.h: generated_cap_names.h base_cap_names.h
exit 1; \
fi
.PHONY: tst_binaries
tst_binaries: $(TESTS)
tst_lib: lib.c parser.h $(filter-out lib.o, ${TEST_OBJECTS})
$(CXX) $(TEST_CFLAGS) -o $@ $< $(filter-out $(<:.c=.o), ${TEST_OBJECTS}) $(TEST_LDFLAGS) $(TEST_LDLIBS)
tst_%: parser_%.c parser.h $(filter-out parser_%.o, ${TEST_OBJECTS})