diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6e92f57 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +tags diff --git a/makefile b/makefile index ab013b5..8347375 100644 --- a/makefile +++ b/makefile @@ -7,7 +7,7 @@ TESTBIN := /tmp/all_tests .PHONY: test -test: +test: tags @echo "Discovering test files..." @files=$$(find . -type f -name 'test*.c'); \ if [ -z "$$files" ]; then \ @@ -18,3 +18,11 @@ test: echo "Running tests..."; \ $(TESTBIN); \ fi + + +PROJECT_ROOT := $(shell pwd) +PROJECT_C_FILES := $(shell find $(PROJECT_ROOT) \( -name '*.c' -o -name '*.h' \)) +CRITERION_HEADERS := $(shell find /usr/include/criterion) +ALL_FILES := $(PROJECT_C_FILES) $(CRITERION_HEADERS) +tags: $(ALL_FILES) + ctags $(ALL_FILES)