CFLAGS=-std=c99 -Wall -Wextra -pedantic
CPPFLAGS=-MMD -MF $*.d # Generate dependency files
LDLIBS=-lm
all: main

-include *.d # Include dependency files, ignore if non-existant

main: test.o
%.o: %.d # If dependencies have changed, recompile too
%.d: ; # if a dependency file is missing (eg. on first run), don't panic
clean:
	@$(RM) -v main *.o *.d
.PHONY: all clean
.PRECIOUS: *.o *.d
