# set latexfile to the name of the main file without the .tex latexfile = midterm1 INDENT = indent CC = clang LDFLAGS = -O CFLAGS = -Weverything -Wextra -pedantic $(LDFLAGS) LDLIBS = .SUFFIXES: .SUFFIXES: .c .res .PHONY: clean test sources = $(wildcard $(latexfile)-*.c) testres = $(sources:.c=.res) %.res: %.c $(INDENT) $< $(CC) $(CFLAGS) $< -o $* ./$* | tee $*.res rm -f ./$* tests: $(testres) clean : rm -f *.*~ rm -f $(testres)