
CXX := mpiCC
CXXFLAGS := `sdl-config --cflags` -fopenmp
LDFLAGS := `sdl-config --libs` -fopenmp
TARGET1 := mpi-fractals
TARGET2 := mpi-fractals-static
OBJS := NewtonComputation.o
OBJS += FatouComputation.o

all: $(TARGET1) $(TARGET2)

$(TARGET1): $(OBJS) $(TARGET1).o
	$(CXX) -o $@ $^ $(LDFLAGS)

$(TARGET2): $(OBJS) $(TARGET2).o
	$(CXX) -o $@ $^ $(LDFLAGS)

%.o: %.cc
	$(CXX) -o $@ -c $< $(CXXFLAGS)

clean:
	-rm -f *.o *~ $(TARGET1) $(TARGET2)
