From 301faf3cc76f15e1951bc8b2d1ebc1f74b558818 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Sat, 12 Sep 2015 22:35:28 +0200 Subject: Some cleanup --- Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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 -- cgit v1.2.3-70-g09d2