################################################################################
# Copyright (c) 2010, 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the terms
# of the MIT License which is available at https://opensource.org/licenses/MIT
#
# SPDX-License-Identifier: MIT
################################################################################
#
# Makefile for building density function plots.
# The *.dat files have been generated by the
# gen-chi-docu-distributions-plot-data.launch launch configuration.
#
SVG_FILES=gamma.svg beta.svg binomial.svg bernoulli.svg disc_uni.svg \
	cont_uni.svg exponential.svg lognormal.svg normal.svg poisson.svg \
	triangle.svg weibull.svg

.phony: images clean

images: $(SVG_FILES)

bernoulli.svg: bernoulli.plt bernoulli.dat
	gnuplot bernoulli.plt

beta.svg: beta.plt beta_0.8_0.5.dat beta_1.5_3.0.dat beta_2.0_2.0.dat beta_5.0_1.5.dat
	gnuplot beta.plt

binomial.svg: binomial.plt binomial_20_0.5.dat binomial_20_0.7.dat binomial_40_0.5.dat
	gnuplot binomial.plt

cont_uni.svg: cont_uni.plt cont_uni1.dat cont_uni2.dat
	gnuplot cont_uni.plt

disc_uni.svg: disc_uni.plt disc_uni1.dat disc_uni2.dat
	gnuplot disc_uni.plt

exponential.svg: exponential.plt exponential_0.5.dat exponential_1.0.dat exponential_1.5.dat
	gnuplot exponential.plt

gamma.svg: gamma.plt gamma_1.0_2.0.dat gamma_3.0_2.0.dat gamma_6.0_0.5.dat gamma_6.0_2.0.dat
	gnuplot gamma.plt

lognormal.svg: lognormal.plt lognormal_0.0_0.25.dat lognormal_0.0_0.5.dat lognormal_0.0_1.0.dat
	gnuplot lognormal.plt

normal.svg: normal.plt normal_3_1.dat normal_5_2.dat
	gnuplot normal.plt

poisson.svg: poisson.plt poisson_10.0.dat poisson_4.0.dat
	gnuplot poisson.plt

triangle.svg: triangle.plt triangle_1_2_4.dat
	gnuplot triangle.plt

weibull.svg: weibull.plt weibull_0.5_1.0.dat weibull_1.0_1.0.dat weibull_1.5_1.0.dat weibull_5.0_1.0.dat
	gnuplot weibull.plt

clean:
	for i in $(SVG_FILES) $(SVG_FILES:.svg=.pdf);\
	do if test -f $$i;\
	   then rm $$i;\
	   fi;\
	done
