.PHONY: all compile checkstyle test clean format
.PRECIOUS: %.o
.SUFFIXES:
all: format compile test
compile: ArrayTest
checkstyle:
clang-format-18 --dry-run -Werror *.h *.cpp
format:
clang-format-18 -i *.h *.cpp
test: ArrayTest
./ArrayTest
clean:
rm -f ArrayTest
rm -f *.o
%.o: %.cpp *.h
clang++ -c $< -o $@
ArrayTest: ArrayTest.o Array.o
clang++ -g -fsanitize=address -o ArrayTest $^ -lgtest -lgtest_main