aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authortomsmeding <hallo@tomsmeding.nl>2015-09-12 22:35:28 +0200
committertomsmeding <hallo@tomsmeding.nl>2015-09-12 22:38:05 +0200
commit301faf3cc76f15e1951bc8b2d1ebc1f74b558818 (patch)
treeaf5224b450e5de21d91f0c86ba0b2b7470f23c19 /Makefile
parent054fb35f9318432fe5effafab4976feff25ca807 (diff)
Some cleanupHEADmaster
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..230ae9e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,26 @@
+CXX = g++
+CXXFLAGS = -Wall -O2
+
+.PHONY: all clean remake
+
+all: graytrace
+
+clean:
+ rm -f graytrace graytrace.o lodepng.o
+
+remake: clean all
+
+
+graytrace: lodepng.o graytrace.cpp graytrace.o
+ $(CXX) $(CXXFLAGS) graytrace.o lodepng.o -o graytrace
+
+lodepng.o: lodepng.cpp lodepng.h
+ $(CXX) $(CXXFLAGS) -c -o lodepng.o lodepng.cpp
+
+lodepng.cpp:
+ @if ! test -e lodepng.cpp; then \
+ /bin/echo -n Downloading lodepng...\ ; \
+ curl -s 'https://raw.githubusercontent.com/lvandeve/lodepng/master/lodepng.cpp' >lodepng.cpp; \
+ curl -s 'https://raw.githubusercontent.com/lvandeve/lodepng/master/lodepng.h' >lodepng.h; \
+ /bin/echo done.; \
+ fi