summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2014-08-08 12:58:02 -0400
committerTavian Barnes <tavianator@tavianator.com>2014-08-08 12:58:02 -0400
commitaf442be2fa586a98e8e4da1bb88a9236f5c191d2 (patch)
treedbed76a0a164200dc3bef0d2d9c1ca20f01013ba
parent7c373a68e837e4183bee65a046623d7957f44d6b (diff)
downloadkd-forest-af442be2fa586a98e8e4da1bb88a9236f5c191d2.tar.xz
Allow kd-forest flags to be overridden in the Makefile.
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index b49887b..e96db00 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,9 @@ RM = rm -f
DEPS = Makefile color.h kd-forest.h options.h util.h
+IMAGEFLAGS = -b 24 -s -l min -c Lab
+ANIMFLAGS = -b 19 -s -l mean -c Lab
+
kd-forest: color.o kd-forest.o main.o options.o util.o
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o kd-forest
@@ -26,14 +29,14 @@ kd-forest: color.o kd-forest.o main.o options.o util.o
image: kd-forest.png
kd-forest.png: kd-forest
- ./kd-forest -b 24 -s -l min -c Lab -o kd-forest.png
+ ./kd-forest $(IMAGEFLAGS) -o kd-forest.png
anim: kd-forest.mkv
kd-forest.mkv: kd-forest
$(RM) kd-forest.mkv
mkdir /tmp/kd-frames
- ./kd-forest -b 19 -s -l mean -c Lab -a -o /tmp/kd-frames
+ ./kd-forest $(ANIMFLAGS) -a -o /tmp/kd-frames
ffmpeg -r 60 -i /tmp/kd-frames/%04d.png -c:v libx264 -preset veryslow -qp 0 kd-forest.mkv
$(RM) -r /tmp/kd-frames