###############################################################
#
#   Makefile to create all plots 
#
#   Janine Glänzel, Roman Unger ... 06/2014 
#
###############################################################
#
#   Copyright (C) 2014  Janine Glänzel, Roman Unger
#
#   janine.glaenzel@mathematik.tu-chemnitz.de
#   roman.unger@mathematik.tu-chemnitz.de
#
#   This program is free software: you can redistribute it 
#   and/or modify it under the terms of the GNU General Public 
#   License as published by the Free Software Foundation, 
#   either version 3 of the License, or (at your option) any 
#   later version.
#
#   This program is distributed in the hope that it will be 
#   useful, but WITHOUT ANY WARRANTY; without even the implied 
#   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
#   PURPOSE. 
#   See the GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public 
#   License along with this program.  
#   If not, see <http://www.gnu.org/licenses/>.
#
###############################################################


# The target files are PDFs.
#
# To get foo.pdf create a gnuplot file foo.txt
# and set in this gnuplotfile the output as 
# set output 'foo-input.tex' 

ALLPLOTS   = example_v1.pdf
ALLPLOTS  += example_v2.pdf
ALLPLOTS  += example_v3.pdf

#ALLPLOTS += colmapshow_cm99.pdf
#ALLPLOTS += colmapshow_cm01.pdf
#ALLPLOTS += colmapshow_cmtg.pdf

# The main target 
all: $(ALLPLOTS)

# and the build rule
%.pdf : %.txt 
	perl DoPic.pl  $< 



.PHONY : clean realclean

ALLDVI =$(ALLPLOTS:.pdf=.dvi)
ALLEPS =$(ALLPLOTS:.pdf=.eps)
ALLTEX =$(ALLPLOTS:.pdf=.tex)
ALLTEXI=$(ALLPLOTS:.pdf=-input.tex)
ALLEPSI=$(ALLPLOTS:.pdf=-input.eps)
ALLPDFI=$(ALLPLOTS:.pdf=-input.pdf)
ALLPS  =$(ALLPLOTS:.pdf=.ps)
ALLLOG =$(ALLPLOTS:.pdf=.log)
ALLAUX =$(ALLPLOTS:.pdf=.aux)


clean : 
	rm -fv $(ALLDVI)  $(ALLEPS) $(ALLTEX) $(ALLTEXI)
	rm -fv $(ALLEPSI) $(ALLPS)  $(ALLLOG) $(ALLAUX) $(ALLPDFI)
	rm -fv $(ALLPLOTS)

realclean : clean