xref: /netbsd-src/external/lgpl3/mpfr/dist/tune/Makefile.am (revision 4f645668ed707e1f969c546666f8c8e45e6f8888)
1# Copyright 2010-2020 Free Software Foundation, Inc.
2# This Makefile.am is free software; the Free Software Foundation
3# gives unlimited permission to copy and/or distribute it,
4# with or without modifications, as long as this notice is preserved.
5
6# This program is distributed in the hope that it will be useful,
7# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
8# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
9# PARTICULAR PURPOSE.
10
11
12# Since we do not require GNU "make", let's select the POSIX behavior to
13# uniformize the behavior a bit more with various "make" implementations
14# and ease maintenance. This target should be removed only if one day,
15# we need to require GNU "make".
16.POSIX:
17
18EXTRA_PROGRAMS = tuneup speed bidimensional_sample
19
20tuneup_SOURCES = tuneup.c
21tuneup_LDADD = -lspeed $(top_builddir)/src/libmpfr.la $(TUNE_LIBS)
22tuneup_LDFLAGS = -static
23
24speed_SOURCES = speed.c
25speed_LDADD = -lspeed $(top_builddir)/src/libmpfr.la $(TUNE_LIBS)
26speed_LDFLAGS = -static
27
28bidimensional_sample_SOURCES = bidimensional_sample.c
29bidimensional_sample_LDADD = -lspeed $(top_builddir)/src/libmpfr.la $(TUNE_LIBS)
30bidimensional_sample_LDFLAGS = -static
31
32AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src
33
34tune:
35	$(MAKE) $(AM_MAKEFLAGS) tuneup$(EXEEXT)
36	./tuneup$(EXEEXT) -v
37	mv mparam.h $(top_builddir)/src/
38	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) clean
39	cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) libmpfr.la
40
41$(top_builddir)/src/libmpfr.la:
42	cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) libmpfr.la
43
44CLEANFILES = $(EXTRA_PROGRAMS) mparam.h
45