CC = clang++
CFLAGS = -std=c++14
LFLAGS = -lsfml-system -lsfml-graphics -lsfml-window

main.o: main.cpp
	$(CC) $< $(CFLAGS) -c

test: main.o
	$(CC) $^ $(LFLAGS) -o test

.PHONY: all
all: test

.PHONY: check
check: test
	rm output.jpg
	./test arch.jpg output.jpg
	rm arch.jpg
	mv output.jpg arch.jpg
	./test arch.jpg output.jpg

.PHONY: clean
clean:
	rm *.o
	rm test
	rm output.jpg
