# set path to installed plplot
PLPLOT_DIR =/home/${USER}/pf/plplot-5.12.0

PLPLOT_RPATH = -Wl,-rpath,${PLPLOT_DIR}/lib
LIB = ${PLPLOT_RPATH} -L${PLPLOT_DIR}/lib -lplplotf95 -lplplot
INCLUDE = -I${PLPLOT_DIR}/include/plplot -I${PLPLOT_DIR}/lib/fortran/modules/plplot


FFLAGS = -O2 -std=gnu -cpp -fbackslash

all: test_plplot

test_plplot: test_plplot.f90
	/home/${USER}/pf/gcc-6.3.0/bin/gfortran $(FFLAGS) $(INCLUDE) $(LIB) $^ -o $@


.PHONY: distclean
distclean: clean
	rm -f test_plplot

.PHONY: clean
clean:
	rm -f *~

