CFLAGS = -Wall -Wextra -Wconversion -O3 -std=c++11
LIBS = -lsfml-graphics -lsfml-window -lsfml-system -pthread

all: complex.o mandelbrot.o main.o
	g++ complex.o mandelbrot.o main.o -o main $(LIBS)

complex.o: complex.hpp complex.cpp
	g++ $(CFLAGS) -c complex.cpp

mandelbrot.o: mandelbrot.hpp mandelbrot.cpp stack.h
	g++ $(CFLAGS) -c mandelbrot.cpp -lm

main.o: main.cpp complex.hpp mandelbrot.hpp
	g++ $(CFLAGS) -c main.cpp

clean:
	rm -f *.o main

