# examples/ada/Makefile.examples.in for PLplot
###
### Process this file with configure to produce Makefile.examples
###
# Copyright (C) 2002, 2004  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

GNAT_EXECUTABLE_BUILDER = @GNAT_EXECUTABLE_BUILDER@ \
	-aI@ADA_INCLUDE_DIR@ -aL@ADA_LIB_DIR@
EXEEXT = @EXEEXT@

LIB_TAG = @LIB_TAG@
PKG_CONFIG_ENV = @PKG_CONFIG_ENV@
RPATHCMD = @RPATHCMD@

EXECUTABLES_list = \
	x01a$(EXEEXT) \
	x02a$(EXEEXT) \
	x03a$(EXEEXT) \
	x04a$(EXEEXT) \
	x05a$(EXEEXT) \
	x06a$(EXEEXT) \
	x07a$(EXEEXT) \
	x10a$(EXEEXT) \
	x12a$(EXEEXT) \
	xthick01a$(EXEEXT) \
	xthick02a$(EXEEXT) \
	xthick03a$(EXEEXT) \
	xthick04a$(EXEEXT) \
	xthick05a$(EXEEXT) \
	xthick06a$(EXEEXT) \
	xthick07a$(EXEEXT) \
	xthick10a$(EXEEXT) \
	xthick12a$(EXEEXT)
		 
all: $(EXECUTABLES_list)

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

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

.SUFFIXES: .adb $(EXEEXT)
