From 086e49a701debe24c0e8547fb0db2d08e12e1e14 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Tue, 20 Sep 2016 01:03:51 +1200 Subject: Add header files as dependencies to object files --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a2f4358..0a60968 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,9 @@ CFLAGS += -Wall -Wextra -Werror LDFLAGS += -lm -lpthread + +HEADERS = generator.h algorithms.h fractal-gen.h + + all: fractal-gen symlinks symlinks: fractal-gen @@ -10,6 +14,8 @@ fractal-gen: fractal-gen.o \ algorithms/mandelbrot.o \ algorithms/burning-ship.o \ +*.o: *.c $(HEADERS) + $(CC) -c -o $@ $< $(CFLAGS) clean: clean-object rm fractal-gen \ -- cgit v1.1