blob: 230ae9eb2799a1d52748aa948d6967293e024b2f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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
|