# examples/ada/Makefile.examples.in for PLplot
###
### Process this file with configure to produce Makefile.examples
###
# Copyright (C) 2002-2015  Alan W. Irwin
# Copyright (C) 2004  Rafael Laboissiere
# Copyright (C) 2004  Andrew Ross
#
# This file is part of PLplot.
#
# PLplot is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# PLplot 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 Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public License
# along with the file PLplot; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA

# WARNING: For the case of a static PLplot build and where C++ code is
# included in the resulting libplplot.a archive (i.e., when any of the
# C++ qt, psttf, and wxwidgets device drivers are enabled) the builds
# below will be incomplete (i.e., they will require -L and -l flags
# for the special C++ compiler library associated with the particular
# C++ compiler being used [e.g., libstdc++ for g++]).

SHELL = /bin/bash
GNAT_EXECUTABLE_BUILDER = /usr/bin/gnatmake \
	-aI/usr/share/ada/adainclude/plplotada -aL/usr/lib64/ada/adalib/plplotada
EXEEXT = 

PKG_CONFIG_ENV = PKG_CONFIG_PATH="/usr/lib64/pkgconfig::/usr/lib64/pkgconfig:/usr/share/pkgconfig"
RPATHCMD = 

EXECUTABLES_list = \
	x00a$(EXEEXT) \
	x01a$(EXEEXT) \
	x02a$(EXEEXT) \
	x03a$(EXEEXT) \
	x04a$(EXEEXT) \
	x05a$(EXEEXT) \
	x06a$(EXEEXT) \
	x07a$(EXEEXT) \
	x08a$(EXEEXT) \
	x09a$(EXEEXT) \
	x10a$(EXEEXT) \
	x11a$(EXEEXT) \
	x12a$(EXEEXT) \
	x13a$(EXEEXT) \
	x14a$(EXEEXT) \
	x15a$(EXEEXT) \
	x16a$(EXEEXT) \
	x17a$(EXEEXT) \
	x18a$(EXEEXT) \
	x19a$(EXEEXT) \
	x20a$(EXEEXT) \
	x21a$(EXEEXT) \
	x22a$(EXEEXT) \
	x23a$(EXEEXT) \
	x24a$(EXEEXT) \
	x25a$(EXEEXT) \
	x26a$(EXEEXT) \
	x27a$(EXEEXT) \
	x28a$(EXEEXT) \
	x29a$(EXEEXT) \
	x30a$(EXEEXT) \
	x31a$(EXEEXT) \
	x33a$(EXEEXT) \
	xthick00a$(EXEEXT) \
	xthick01a$(EXEEXT) \
	xthick02a$(EXEEXT) \
	xthick03a$(EXEEXT) \
	xthick04a$(EXEEXT) \
	xthick05a$(EXEEXT) \
	xthick06a$(EXEEXT) \
	xthick07a$(EXEEXT) \
	xthick08a$(EXEEXT) \
	xthick09a$(EXEEXT) \
	xthick10a$(EXEEXT) \
	xthick11a$(EXEEXT) \
	xthick12a$(EXEEXT) \
	xthick13a$(EXEEXT) \
	xthick14a$(EXEEXT) \
	xthick15a$(EXEEXT) \
	xthick16a$(EXEEXT) \
	xthick17a$(EXEEXT) \
	xthick18a$(EXEEXT) \
	xthick19a$(EXEEXT) \
	xthick20a$(EXEEXT) \
	xthick21a$(EXEEXT) \
	xthick22a$(EXEEXT) \
	xthick23a$(EXEEXT) \
	xthick24a$(EXEEXT) \
	xthick25a$(EXEEXT) \
	xthick26a$(EXEEXT) \
	xthick27a$(EXEEXT) \
	xthick28a$(EXEEXT) \
	xthick29a$(EXEEXT) \
	xthick30a$(EXEEXT) \
	xthick31a$(EXEEXT) \
	xthick33a$(EXEEXT)
		 
all: $(EXECUTABLES_list)

clean:
	rm -f $(EXECUTABLES_list) *.ali *.o

# target_link_libraries( plplotada plplot)
# Due to command-line limitations of gnatmake cannot continue (by trailing \)
# anything after -cargs below.
.adb$(EXEEXT):
	$(GNAT_EXECUTABLE_BUILDER) $< \
	-cargs $(shell $(PKG_CONFIG_ENV) pkg-config  --cflags plplot-ada plplot) -largs $(RPATHCMD) $(shell $(PKG_CONFIG_ENV) pkg-config  --libs plplot-ada plplot)

.SUFFIXES: .adb $(EXEEXT)
