diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2014-08-06 12:31:35 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2014-08-06 12:31:35 -0400 |
commit | b72e0da99ef6c379bb95c637a83496ebd1aa3284 (patch) | |
tree | b66273ad026b309fe1f937220e1a2b516abc5d13 /Makefile | |
parent | 1f690e899155f6c1b888fa1262fde28e468694e7 (diff) | |
download | kd-forest-b72e0da99ef6c379bb95c637a83496ebd1aa3284.tar.xz |
Allow parallel compilation.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -15,13 +15,20 @@ LDFLAGS ?= -Wl,-O1,--sort-common,--as-needed,-z,relro LIBS ?= -lm -lpng RM ?= rm -f -kd-forest: kd-forest.c kd-forest.h util.c util.h color.c color.h main.c - $(CC) $(CFLAGS) $(LDFLAGS) kd-forest.c util.c color.c main.c $(LIBS) -o kd-forest +HEADERS = color.h kd-forest.h util.h + +kd-forest: color.o kd-forest.o main.o util.o + $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o kd-forest + +%.o: %.c $(HEADERS) + $(CC) $(CFLAGS) -c $< -o $@ + +image: kd-forest.png kd-forest.png: kd-forest ./kd-forest -b 24 -s -c Lab -o kd-forest.png -image: kd-forest.png +anim: kd-forest.mkv kd-forest.mkv: kd-forest $(RM) kd-forest.mkv @@ -30,9 +37,8 @@ kd-forest.mkv: kd-forest ./kd-forest -b 20 -s -c Lab -a -o frames ffmpeg -r 60 -i frames/%04d.png -c:v libx264 -preset veryslow -qp 0 kd-forest.mkv -anim: kd-forest.mkv - clean: + $(RM) *.o $(RM) kd-forest $(RM) -r frames |