CFLAGS += -std=c89 -g -ggdb -Iinclude TASK_ARGS += -t 0.1 .PHONY: clean all euler rk4 run tests all: echo "either make euler or make rk4" euler: task8 ./$< $(TASK_ARGS) -m euler rk4: task8 ./$< $(TASK_ARGS) -m rk4 tests: task8 check ./check f1.data f2.data f3.data f4.data out.data echo "plot 'out.data' with lines" | gnuplot - -p echo "plot 'f1.data','f2.data','f3.data','f4.data'" | gnuplot - -p run: task8 ./$< $(TASK_ARGS) build: mkdir -p build build/%.o: src/%.c include/%.h build $(CC) -c -o $@ $(CFLAGS) $< -lm task8: main.c build/diffeq.o build/equations.o $(CC) -o $@ $(CFLAGS) $^ -lm check: check.c $(CC) -o check $(CFLAGS) check.c -lm clean: $(RM) *.o task8 check build/* *.data