INDENT = astyle --style=allman --add-brackets CC = clang LDFLAGS = -O CFLAGS = -Weverything -Wextra -pedantic $(LDFLAGS) LDLIBS = -lm .SUFFIXES: .SUFFIXES: .c .o .h .PHONY: clean veryclean indent all sources = $(wildcard *.c) progs = $(sources:.c=) ## help : Default action is to show what commands are available. help: Makefile @sed -n 's/^##//p' $< ## all : Compile and link the executables all : $(progs) ## indent : Indent the source code indent: $(INDENT) $(sources) ## clean : Remove the auto-generated files clean : rm -f *.o rm -f *.*~ rm -f *.*.orig ## veryclean : Remove the auto-generated files, ## the tests results, and the graph veryclean : clean rm -f $(progs) ## settings : Show variables and settings. settings: @echo ' ' @echo 'sources :' $(sources) @echo 'progs :' $(progs) @echo ' ' @echo 'INDENT :' $(INDENT) @echo ' ' @echo 'CC :' $(CC) @echo 'LDFLAGS :' $(LDFLAGS) @echo 'CFLAGS :' $(CFLAGS) @echo 'LDLIBS :' $(LDLIBS) @echo ' '