# Makefile for the compiled version for comparison with parallel python codes
# Ramses van Zon
# SciNetHPC, 2017-2019
#
# This is a cut down version for the Intro to GPU Programming class
# Yohai Meiron
# SciNetHPC, 2022

CXXFLAGS=-O3
LDLIBS=-lcpgplot -lpgplot -lX11 -lxcb -ldl -lXau -lgfortran -lpng

all: diff2d

.PHONY: all clean

diff2d.o: diff2d.cpp diff2dparams.py diff2dplot.h
	$(CXX) -c $(CXXFLAGS) -o $@ $<

diff2dplot.o: diff2dplot.cpp
	$(CXX) -c $(CXXFLAGS) -o $@ $<

diff2d : diff2d.o diff2dplot.o
	$(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS)

clean:
	$(RM) -f *.o diff2d

