#    GMPAda, binding to the Ada Language for the GNU MultiPrecision library.
#    Copyright (C) 2007,2009 Nicolas Boulenguez <nicolas.boulenguez@free.fr>
#
#    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/>.


# Normal users won’t need this Makefile or the devel project. See
# README file.

test:
	gnatmake -Pdevel
	./demo
clean:
	gnatclean -Pdevel
	$(RM) *~ output
.PHONY: test clean

# With something like gprmake (available until gnat-4.3), this should
# be enough to compile C files mentioned in project files. Its
# successor gprbuild should do the same.

# For those using gcc-4-4, we do it without gprmake here.
# This test should not depend on obsolete features of gnat.

# You must set here the directory containing GMP source (usually
# something like /usr/share/ada/adainclude/gmp).
GMP_SRC_DIR := ../gmp

test: gmp_macros.o
gmp_macros.o: $(GMP_SRC_DIR)/gmp_macros.c
	cc -c -fstack-check -g -gstabs+ -Wall $< -o $@
clean: c_clean
c_clean:
	rm -f gmp_macros.o
.PHONY: c_clean
