1# Makefile.in generated by automake 1.11.6 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
6# Foundation, Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18# Copyright 2000-2003, 2005-2011 Free Software Foundation, Inc.
19#
20#  This file is part of the GNU MP Library.
21#
22#  The GNU MP Library is free software; you can redistribute it and/or modify
23#  it under the terms of either:
24#
25#    * the GNU Lesser General Public License as published by the Free
26#      Software Foundation; either version 3 of the License, or (at your
27#      option) any later version.
28#
29#  or
30#
31#    * the GNU General Public License as published by the Free Software
32#      Foundation; either version 2 of the License, or (at your option) any
33#      later version.
34#
35#  or both in parallel, as here.
36#
37#  The GNU MP Library is distributed in the hope that it will be useful, but
38#  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
39#  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
40#  for more details.
41#
42#  You should have received copies of the GNU General Public License and the
43#  GNU Lesser General Public License along with the GNU MP Library.  If not,
44#  see https://www.gnu.org/licenses/.
45
46# Copyright 1996, 1998-2002 Free Software Foundation, Inc.
47#
48#  This file is part of the GNU MP Library.
49#
50#  The GNU MP Library is free software; you can redistribute it and/or modify
51#  it under the terms of either:
52#
53#    * the GNU Lesser General Public License as published by the Free
54#      Software Foundation; either version 3 of the License, or (at your
55#      option) any later version.
56#
57#  or
58#
59#    * the GNU General Public License as published by the Free Software
60#      Foundation; either version 2 of the License, or (at your option) any
61#      later version.
62#
63#  or both in parallel, as here.
64#
65#  The GNU MP Library is distributed in the hope that it will be useful, but
66#  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
67#  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
68#  for more details.
69#
70#  You should have received copies of the GNU General Public License and the
71#  GNU Lesser General Public License along with the GNU MP Library.  If not,
72#  see https://www.gnu.org/licenses/.
73
74VPATH = @srcdir@
75am__make_dryrun = \
76  { \
77    am__dry=no; \
78    case $$MAKEFLAGS in \
79      *\\[\ \	]*) \
80        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
81          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
82      *) \
83        for am__flg in $$MAKEFLAGS; do \
84          case $$am__flg in \
85            *=*|--*) ;; \
86            *n*) am__dry=yes; break;; \
87          esac; \
88        done;; \
89    esac; \
90    test $$am__dry = yes; \
91  }
92pkgdatadir = $(datadir)/@PACKAGE@
93pkgincludedir = $(includedir)/@PACKAGE@
94pkglibdir = $(libdir)/@PACKAGE@
95pkglibexecdir = $(libexecdir)/@PACKAGE@
96am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
97install_sh_DATA = $(install_sh) -c -m 644
98install_sh_PROGRAM = $(install_sh) -c
99install_sh_SCRIPT = $(install_sh) -c
100INSTALL_HEADER = $(INSTALL_DATA)
101transform = $(program_transform_name)
102NORMAL_INSTALL = :
103PRE_INSTALL = :
104POST_INSTALL = :
105NORMAL_UNINSTALL = :
106PRE_UNINSTALL = :
107POST_UNINSTALL = :
108build_triplet = @build@
109host_triplet = @host@
110EXTRA_PROGRAMS = speed$(EXEEXT) speed-dynamic$(EXEEXT) \
111	speed-ext$(EXEEXT) tuneup$(EXEEXT) tune-gcd-p$(EXEEXT)
112DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/../mpn/Makeasm.am \
113	$(srcdir)/Makefile.am $(srcdir)/Makefile.in
114subdir = tune
115ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
116am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
117	$(top_srcdir)/configure.ac
118am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
119	$(ACLOCAL_M4)
120mkinstalldirs = $(install_sh) -d
121CONFIG_HEADER = $(top_builddir)/config.h
122CONFIG_CLEAN_FILES =
123CONFIG_CLEAN_VPATH_FILES =
124am__DEPENDENCIES_1 =
125am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) \
126	$(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la
127am_libspeed_la_OBJECTS = common.lo divrem1div.lo divrem1inv.lo \
128	divrem2div.lo divrem2inv.lo div_qr_1n_pi1_1.lo \
129	div_qr_1n_pi1_2.lo div_qr_1_tune.lo freq.lo gcdext_single.lo \
130	gcdext_double.lo gcdextod.lo gcdextos.lo hgcd_lehmer.lo \
131	hgcd_appr_lehmer.lo hgcd_reduce_1.lo hgcd_reduce_2.lo \
132	jacbase1.lo jacbase2.lo jacbase3.lo jacbase4.lo mod_1_div.lo \
133	mod_1_inv.lo mod_1_1-1.lo mod_1_1-2.lo modlinv.lo noop.lo \
134	powm_mod.lo powm_redc.lo pre_divrem_1.lo set_strb.lo \
135	set_strs.lo set_strp.lo time.lo
136libspeed_la_OBJECTS = $(am_libspeed_la_OBJECTS)
137libspeed_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
138	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
139	$(libspeed_la_LDFLAGS) $(LDFLAGS) -o $@
140am_speed_OBJECTS = speed.$(OBJEXT)
141speed_OBJECTS = $(am_speed_OBJECTS)
142speed_LDADD = $(LDADD)
143speed_DEPENDENCIES = $(DEPENDENCIES) $(am__DEPENDENCIES_1)
144speed_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
145	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(speed_LDFLAGS) \
146	$(LDFLAGS) -o $@
147am_speed_dynamic_OBJECTS = speed.$(OBJEXT)
148speed_dynamic_OBJECTS = $(am_speed_dynamic_OBJECTS)
149speed_dynamic_LDADD = $(LDADD)
150speed_dynamic_DEPENDENCIES = $(DEPENDENCIES) $(am__DEPENDENCIES_1)
151am_speed_ext_OBJECTS = speed-ext.$(OBJEXT)
152speed_ext_OBJECTS = $(am_speed_ext_OBJECTS)
153speed_ext_LDADD = $(LDADD)
154speed_ext_DEPENDENCIES = $(DEPENDENCIES) $(am__DEPENDENCIES_1)
155speed_ext_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
156	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
157	$(speed_ext_LDFLAGS) $(LDFLAGS) -o $@
158am_tune_gcd_p_OBJECTS = tune-gcd-p.$(OBJEXT)
159tune_gcd_p_OBJECTS = $(am_tune_gcd_p_OBJECTS)
160tune_gcd_p_LDADD = $(LDADD)
161tune_gcd_p_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
162	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
163	$(tune_gcd_p_LDFLAGS) $(LDFLAGS) -o $@
164am_tuneup_OBJECTS = tuneup.$(OBJEXT)
165am__objects_1 = div_qr_2.$(OBJEXT) bdiv_q.$(OBJEXT) bdiv_qr.$(OBJEXT) \
166	dcpi1_div_qr.$(OBJEXT) dcpi1_divappr_q.$(OBJEXT) \
167	dcpi1_bdiv_qr.$(OBJEXT) dcpi1_bdiv_q.$(OBJEXT) \
168	invertappr.$(OBJEXT) invert.$(OBJEXT) binvert.$(OBJEXT) \
169	divrem_2.$(OBJEXT) gcd.$(OBJEXT) gcdext.$(OBJEXT) \
170	get_str.$(OBJEXT) set_str.$(OBJEXT) matrix22_mul.$(OBJEXT) \
171	hgcd.$(OBJEXT) hgcd_appr.$(OBJEXT) hgcd_reduce.$(OBJEXT) \
172	mul_n.$(OBJEXT) sqr.$(OBJEXT) sec_powm.$(OBJEXT) \
173	mullo_n.$(OBJEXT) mul_fft.$(OBJEXT) mul.$(OBJEXT) \
174	tdiv_qr.$(OBJEXT) mulmod_bnm1.$(OBJEXT) sqrmod_bnm1.$(OBJEXT) \
175	mulmid.$(OBJEXT) mulmid_n.$(OBJEXT) toom42_mulmid.$(OBJEXT) \
176	nussbaumer_mul.$(OBJEXT) toom6h_mul.$(OBJEXT) \
177	toom8h_mul.$(OBJEXT) toom6_sqr.$(OBJEXT) toom8_sqr.$(OBJEXT) \
178	toom22_mul.$(OBJEXT) toom2_sqr.$(OBJEXT) toom33_mul.$(OBJEXT) \
179	toom3_sqr.$(OBJEXT) toom44_mul.$(OBJEXT) toom4_sqr.$(OBJEXT)
180am__objects_2 = $(am__objects_1) divrem_1.$(OBJEXT) mod_1.$(OBJEXT)
181nodist_tuneup_OBJECTS = sqr_basecase.$(OBJEXT) fac_ui.$(OBJEXT) \
182	$(am__objects_2)
183tuneup_OBJECTS = $(am_tuneup_OBJECTS) $(nodist_tuneup_OBJECTS)
184am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) libspeed.la
185tuneup_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
186	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(tuneup_LDFLAGS) \
187	$(LDFLAGS) -o $@
188DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
189depcomp =
190am__depfiles_maybe =
191COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
192	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
193LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
194	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
195	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
196CCLD = $(CC)
197LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
198	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
199	$(LDFLAGS) -o $@
200SOURCES = $(libspeed_la_SOURCES) $(speed_SOURCES) \
201	$(speed_dynamic_SOURCES) $(speed_ext_SOURCES) \
202	$(tune_gcd_p_SOURCES) $(tuneup_SOURCES) \
203	$(nodist_tuneup_SOURCES)
204DIST_SOURCES = $(libspeed_la_SOURCES) $(speed_SOURCES) \
205	$(speed_dynamic_SOURCES) $(speed_ext_SOURCES) \
206	$(tune_gcd_p_SOURCES) $(tuneup_SOURCES)
207am__can_run_installinfo = \
208  case $$AM_UPDATE_INFO_DIR in \
209    n|no|NO) false;; \
210    *) (install-info --version) >/dev/null 2>&1;; \
211  esac
212HEADERS = $(noinst_HEADERS)
213ETAGS = etags
214CTAGS = ctags
215DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
216ABI = @ABI@
217ACLOCAL = @ACLOCAL@
218AMTAR = @AMTAR@
219AR = @AR@
220AS = @AS@
221ASMFLAGS = @ASMFLAGS@
222AUTOCONF = @AUTOCONF@
223AUTOHEADER = @AUTOHEADER@
224AUTOMAKE = @AUTOMAKE@
225AWK = @AWK@
226CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@
227CC = @CC@
228CCAS = @CCAS@
229CC_FOR_BUILD = @CC_FOR_BUILD@
230CFLAGS = @CFLAGS@
231CPP = @CPP@
232CPPFLAGS = @CPPFLAGS@
233CPP_FOR_BUILD = @CPP_FOR_BUILD@
234CXX = @CXX@
235CXXCPP = @CXXCPP@
236CXXFLAGS = @CXXFLAGS@
237CYGPATH_W = @CYGPATH_W@
238DEFN_LONG_LONG_LIMB = @DEFN_LONG_LONG_LIMB@
239DEFS = @DEFS@
240DLLTOOL = @DLLTOOL@
241DSYMUTIL = @DSYMUTIL@
242DUMPBIN = @DUMPBIN@
243ECHO_C = @ECHO_C@
244ECHO_N = @ECHO_N@
245ECHO_T = @ECHO_T@
246EGREP = @EGREP@
247EXEEXT = @EXEEXT@
248EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
249FGREP = @FGREP@
250GMP_LDFLAGS = @GMP_LDFLAGS@
251GMP_LIMB_BITS = @GMP_LIMB_BITS@
252GMP_NAIL_BITS = @GMP_NAIL_BITS@
253GREP = @GREP@
254HAVE_CLOCK_01 = @HAVE_CLOCK_01@
255HAVE_CPUTIME_01 = @HAVE_CPUTIME_01@
256HAVE_GETRUSAGE_01 = @HAVE_GETRUSAGE_01@
257HAVE_GETTIMEOFDAY_01 = @HAVE_GETTIMEOFDAY_01@
258HAVE_HOST_CPU_FAMILY_power = @HAVE_HOST_CPU_FAMILY_power@
259HAVE_HOST_CPU_FAMILY_powerpc = @HAVE_HOST_CPU_FAMILY_powerpc@
260HAVE_SIGACTION_01 = @HAVE_SIGACTION_01@
261HAVE_SIGALTSTACK_01 = @HAVE_SIGALTSTACK_01@
262HAVE_SIGSTACK_01 = @HAVE_SIGSTACK_01@
263HAVE_STACK_T_01 = @HAVE_STACK_T_01@
264HAVE_SYS_RESOURCE_H_01 = @HAVE_SYS_RESOURCE_H_01@
265INSTALL = @INSTALL@
266INSTALL_DATA = @INSTALL_DATA@
267INSTALL_PROGRAM = @INSTALL_PROGRAM@
268INSTALL_SCRIPT = @INSTALL_SCRIPT@
269INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
270LD = @LD@
271LDFLAGS = @LDFLAGS@
272LEX = @LEX@
273LEXLIB = @LEXLIB@
274LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
275LIBCURSES = @LIBCURSES@
276LIBGMPXX_LDFLAGS = @LIBGMPXX_LDFLAGS@
277LIBGMP_DLL = @LIBGMP_DLL@
278LIBGMP_LDFLAGS = @LIBGMP_LDFLAGS@
279LIBM = @LIBM@
280LIBM_FOR_BUILD = @LIBM_FOR_BUILD@
281LIBOBJS = @LIBOBJS@
282LIBREADLINE = @LIBREADLINE@
283LIBS = @LIBS@
284LIBTOOL = @LIBTOOL@
285LIPO = @LIPO@
286LN_S = @LN_S@
287LTLIBOBJS = @LTLIBOBJS@
288M4 = @M4@
289MAINT = @MAINT@
290MAKEINFO = @MAKEINFO@
291MANIFEST_TOOL = @MANIFEST_TOOL@
292MKDIR_P = @MKDIR_P@
293NM = @NM@
294NMEDIT = @NMEDIT@
295OBJDUMP = @OBJDUMP@
296OBJEXT = @OBJEXT@
297OTOOL = @OTOOL@
298OTOOL64 = @OTOOL64@
299PACKAGE = @PACKAGE@
300PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
301PACKAGE_NAME = @PACKAGE_NAME@
302PACKAGE_STRING = @PACKAGE_STRING@
303PACKAGE_TARNAME = @PACKAGE_TARNAME@
304PACKAGE_URL = @PACKAGE_URL@
305PACKAGE_VERSION = @PACKAGE_VERSION@
306PATH_SEPARATOR = @PATH_SEPARATOR@
307RANLIB = @RANLIB@
308SED = @SED@
309SET_MAKE = @SET_MAKE@
310SHELL = @SHELL@
311SPEED_CYCLECOUNTER_OBJ = @SPEED_CYCLECOUNTER_OBJ@
312STRIP = @STRIP@
313TAL_OBJECT = @TAL_OBJECT@
314TUNE_LIBS = @TUNE_LIBS@
315TUNE_SQR_OBJ = @TUNE_SQR_OBJ@
316U_FOR_BUILD = @U_FOR_BUILD@
317VERSION = @VERSION@
318WITH_READLINE_01 = @WITH_READLINE_01@
319YACC = @YACC@
320YFLAGS = @YFLAGS@
321abs_builddir = @abs_builddir@
322abs_srcdir = @abs_srcdir@
323abs_top_builddir = @abs_top_builddir@
324abs_top_srcdir = @abs_top_srcdir@
325ac_ct_AR = @ac_ct_AR@
326ac_ct_CC = @ac_ct_CC@
327ac_ct_CXX = @ac_ct_CXX@
328ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
329am__leading_dot = @am__leading_dot@
330am__tar = @am__tar@
331am__untar = @am__untar@
332bindir = @bindir@
333build = @build@
334build_alias = @build_alias@
335build_cpu = @build_cpu@
336build_os = @build_os@
337build_vendor = @build_vendor@
338builddir = @builddir@
339datadir = @datadir@
340datarootdir = @datarootdir@
341docdir = @docdir@
342dvidir = @dvidir@
343exec_prefix = @exec_prefix@
344gmp_srclinks = @gmp_srclinks@
345host = @host@
346host_alias = @host_alias@
347host_cpu = @host_cpu@
348host_os = @host_os@
349host_vendor = @host_vendor@
350htmldir = @htmldir@
351includedir = @includedir@
352infodir = @infodir@
353install_sh = @install_sh@
354libdir = @libdir@
355libexecdir = @libexecdir@
356localedir = @localedir@
357localstatedir = @localstatedir@
358mandir = @mandir@
359mkdir_p = @mkdir_p@
360mpn_objects = @mpn_objects@
361mpn_objs_in_libgmp = @mpn_objs_in_libgmp@
362oldincludedir = @oldincludedir@
363pdfdir = @pdfdir@
364prefix = @prefix@
365program_transform_name = @program_transform_name@
366psdir = @psdir@
367sbindir = @sbindir@
368sharedstatedir = @sharedstatedir@
369srcdir = @srcdir@
370sysconfdir = @sysconfdir@
371target_alias = @target_alias@
372top_build_prefix = @top_build_prefix@
373top_builddir = @top_builddir@
374top_srcdir = @top_srcdir@
375INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/tests
376EXTRA_DIST = alpha.asm pentium.asm sparcv9.asm hppa.asm hppa2.asm hppa2w.asm \
377  ia64.asm powerpc.asm powerpc64.asm x86_64.asm many.pl
378
379noinst_HEADERS = speed.h
380@ENABLE_STATIC_FALSE@STATIC =
381
382# Prefer -static on the speed and tune programs, since that can avoid
383# overheads of shared library linkages on some systems.  Libtool tends to
384# botch -static if configured with --disable-static, perhaps reasonably
385# enough.  In any event under --disable-static the only choice is a dynamic
386# link so there's no point in -static.
387#
388@ENABLE_STATIC_TRUE@STATIC = -static
389EXTRA_LTLIBRARIES = libspeed.la
390libspeed_la_SOURCES = \
391  common.c divrem1div.c divrem1inv.c divrem2div.c divrem2inv.c		\
392  div_qr_1n_pi1_1.c div_qr_1n_pi1_2.c div_qr_1_tune.c			\
393  freq.c								\
394  gcdext_single.c gcdext_double.c gcdextod.c gcdextos.c			\
395  hgcd_lehmer.c hgcd_appr_lehmer.c hgcd_reduce_1.c hgcd_reduce_2.c	\
396  jacbase1.c jacbase2.c jacbase3.c jacbase4.c				\
397  mod_1_div.c mod_1_inv.c mod_1_1-1.c mod_1_1-2.c modlinv.c		\
398  noop.c powm_mod.c powm_redc.c pre_divrem_1.c				\
399  set_strb.c set_strs.c set_strp.c time.c
400
401libspeed_la_DEPENDENCIES = $(SPEED_CYCLECOUNTER_OBJ) \
402  $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la
403
404libspeed_la_LIBADD = $(libspeed_la_DEPENDENCIES) $(LIBM)
405libspeed_la_LDFLAGS = $(STATIC)
406DEPENDENCIES = libspeed.la
407LDADD = $(DEPENDENCIES) $(TUNE_LIBS)
408speed_SOURCES = speed.c
409speed_LDFLAGS = $(STATIC)
410speed_dynamic_SOURCES = speed.c
411speed_ext_SOURCES = speed-ext.c
412speed_ext_LDFLAGS = $(STATIC)
413tuneup_SOURCES = tuneup.c
414nodist_tuneup_SOURCES = sqr_basecase.c fac_ui.c $(TUNE_MPN_SRCS)
415tuneup_DEPENDENCIES = $(TUNE_SQR_OBJ) libspeed.la
416tuneup_LDADD = $(tuneup_DEPENDENCIES) $(TUNE_LIBS)
417tuneup_LDFLAGS = $(STATIC)
418tune_gcd_p_SOURCES = tune-gcd-p.c
419tune_gcd_p_DEPENDENCIES = ../mpn/gcd.c
420tune_gcd_p_LDFLAGS = $(STATIC)
421
422# $(MANY_CLEAN) and $(MANY_DISTCLEAN) are hooks for many.pl
423CLEANFILES = $(EXTRA_PROGRAMS) $(EXTRA_LTLIBRARIES) \
424	$(TUNE_MPN_SRCS) fac_ui.c sqr_asm.asm \
425	stg.gnuplot stg.data \
426	mtg.gnuplot mtg.data \
427	fibg.gnuplot fibg.data \
428	graph.gnuplot graph.data \
429	$(MANY_CLEAN)
430
431DISTCLEANFILES = sqr_basecase.c  $(MANY_DISTCLEAN)
432
433# Generating these little files at build time seems better than including
434# them in the distribution, since the list can be changed more easily.
435#
436# mpn/generic/tdiv_qr.c uses mpn_divrem_1 and mpn_divrem_2, but only for 1
437# and 2 limb divisors, which are never used during tuning, so it doesn't
438# matter whether it picks up a tuned or untuned version of those.
439#
440# divrem_1 and mod_1 are recompiled renamed to "_tune" to avoid a linking
441# problem.  If a native divrem_1 provides an mpn_divrem_1c entrypoint then
442# common.c will want that, but the generic divrem_1 doesn't provide it,
443# likewise for mod_1.  The simplest way around this is to have the tune
444# build versions renamed suitably.
445#
446# FIXME: Would like say mul_n.c to depend on $(top_builddir)/mul_n.c so the
447# recompiled object will be rebuilt if that file changes.
448TUNE_MPN_SRCS = $(TUNE_MPN_SRCS_BASIC) divrem_1.c mod_1.c
449TUNE_MPN_SRCS_BASIC = div_qr_2.c bdiv_q.c bdiv_qr.c			\
450  dcpi1_div_qr.c dcpi1_divappr_q.c dcpi1_bdiv_qr.c dcpi1_bdiv_q.c	\
451  invertappr.c invert.c binvert.c divrem_2.c gcd.c gcdext.c		\
452  get_str.c set_str.c matrix22_mul.c					\
453  hgcd.c hgcd_appr.c hgcd_reduce.c					\
454  mul_n.c sqr.c sec_powm.c						\
455  mullo_n.c mul_fft.c mul.c tdiv_qr.c mulmod_bnm1.c sqrmod_bnm1.c	\
456  mulmid.c mulmid_n.c toom42_mulmid.c					\
457  nussbaumer_mul.c toom6h_mul.c toom8h_mul.c toom6_sqr.c toom8_sqr.c	\
458  toom22_mul.c toom2_sqr.c toom33_mul.c toom3_sqr.c toom44_mul.c toom4_sqr.c
459
460
461# COMPILE minus CC.
462#
463COMPILE_FLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
464	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(ASMFLAGS)
465
466
467# Flags used for preprocessing (in ansi2knr rules).
468#
469PREPROCESS_FLAGS = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
470	$(CPPFLAGS)
471
472
473# Recent versions of automake (1.5 and up for instance) append automake
474# generated suffixes to this $(SUFFIXES) list.  This is essential for us,
475# since .c must come after .s, .S and .asm.  If .c is before .s, for
476# instance, then in the mpn directory "make" will see add_n.c mentioned in
477# an explicit rule (the ansi2knr stuff) and decide it must have add_n.c,
478# even if add_n.c doesn't exist but add_n.s does.  See GNU make
479# documentation "(make)Implicit Rule Search", part 5c.
480#
481# On IRIX 6 native make this doesn't work properly though.  Somehow .c
482# remains ahead of .s, perhaps because .c.s is a builtin rule.  .asm works
483# fine though, and mpn/mips3 uses this.
484#
485SUFFIXES = .s .S .asm
486
487# can be overridden during development, eg. "make RM_TMP=: mul_1.lo"
488RM_TMP = rm -f
489all: all-am
490
491.SUFFIXES:
492.SUFFIXES: .s .S .asm .c .lo .o .obj
493$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../mpn/Makeasm.am $(am__configure_deps)
494	@for dep in $?; do \
495	  case '$(am__configure_deps)' in \
496	    *$$dep*) \
497	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
498	        && { if test -f $@; then exit 0; else break; fi; }; \
499	      exit 1;; \
500	  esac; \
501	done; \
502	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps tune/Makefile'; \
503	$(am__cd) $(top_srcdir) && \
504	  $(AUTOMAKE) --gnu --ignore-deps tune/Makefile
505.PRECIOUS: Makefile
506Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
507	@case '$?' in \
508	  *config.status*) \
509	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
510	  *) \
511	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
512	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
513	esac;
514$(srcdir)/../mpn/Makeasm.am:
515
516$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
517	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
518
519$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
520	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
521$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
522	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
523$(am__aclocal_m4_deps):
524libspeed.la: $(libspeed_la_OBJECTS) $(libspeed_la_DEPENDENCIES) $(EXTRA_libspeed_la_DEPENDENCIES)
525	$(libspeed_la_LINK)  $(libspeed_la_OBJECTS) $(libspeed_la_LIBADD) $(LIBS)
526speed$(EXEEXT): $(speed_OBJECTS) $(speed_DEPENDENCIES) $(EXTRA_speed_DEPENDENCIES)
527	@rm -f speed$(EXEEXT)
528	$(speed_LINK) $(speed_OBJECTS) $(speed_LDADD) $(LIBS)
529speed-dynamic$(EXEEXT): $(speed_dynamic_OBJECTS) $(speed_dynamic_DEPENDENCIES) $(EXTRA_speed_dynamic_DEPENDENCIES)
530	@rm -f speed-dynamic$(EXEEXT)
531	$(LINK) $(speed_dynamic_OBJECTS) $(speed_dynamic_LDADD) $(LIBS)
532speed-ext$(EXEEXT): $(speed_ext_OBJECTS) $(speed_ext_DEPENDENCIES) $(EXTRA_speed_ext_DEPENDENCIES)
533	@rm -f speed-ext$(EXEEXT)
534	$(speed_ext_LINK) $(speed_ext_OBJECTS) $(speed_ext_LDADD) $(LIBS)
535tune-gcd-p$(EXEEXT): $(tune_gcd_p_OBJECTS) $(tune_gcd_p_DEPENDENCIES) $(EXTRA_tune_gcd_p_DEPENDENCIES)
536	@rm -f tune-gcd-p$(EXEEXT)
537	$(tune_gcd_p_LINK) $(tune_gcd_p_OBJECTS) $(tune_gcd_p_LDADD) $(LIBS)
538tuneup$(EXEEXT): $(tuneup_OBJECTS) $(tuneup_DEPENDENCIES) $(EXTRA_tuneup_DEPENDENCIES)
539	@rm -f tuneup$(EXEEXT)
540	$(tuneup_LINK) $(tuneup_OBJECTS) $(tuneup_LDADD) $(LIBS)
541
542mostlyclean-compile:
543	-rm -f *.$(OBJEXT)
544
545distclean-compile:
546	-rm -f *.tab.c
547
548.c.o:
549	$(COMPILE) -c $<
550
551.c.obj:
552	$(COMPILE) -c `$(CYGPATH_W) '$<'`
553
554.c.lo:
555	$(LTCOMPILE) -c -o $@ $<
556
557mostlyclean-libtool:
558	-rm -f *.lo
559
560clean-libtool:
561	-rm -rf .libs _libs
562
563ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
564	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
565	unique=`for i in $$list; do \
566	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
567	  done | \
568	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
569	      END { if (nonempty) { for (i in files) print i; }; }'`; \
570	mkid -fID $$unique
571tags: TAGS
572
573TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
574		$(TAGS_FILES) $(LISP)
575	set x; \
576	here=`pwd`; \
577	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
578	unique=`for i in $$list; do \
579	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
580	  done | \
581	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
582	      END { if (nonempty) { for (i in files) print i; }; }'`; \
583	shift; \
584	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
585	  test -n "$$unique" || unique=$$empty_fix; \
586	  if test $$# -gt 0; then \
587	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
588	      "$$@" $$unique; \
589	  else \
590	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
591	      $$unique; \
592	  fi; \
593	fi
594ctags: CTAGS
595CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
596		$(TAGS_FILES) $(LISP)
597	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
598	unique=`for i in $$list; do \
599	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
600	  done | \
601	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
602	      END { if (nonempty) { for (i in files) print i; }; }'`; \
603	test -z "$(CTAGS_ARGS)$$unique" \
604	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
605	     $$unique
606
607GTAGS:
608	here=`$(am__cd) $(top_builddir) && pwd` \
609	  && $(am__cd) $(top_srcdir) \
610	  && gtags -i $(GTAGS_ARGS) "$$here"
611
612distclean-tags:
613	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
614
615distdir: $(DISTFILES)
616	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
617	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
618	list='$(DISTFILES)'; \
619	  dist_files=`for file in $$list; do echo $$file; done | \
620	  sed -e "s|^$$srcdirstrip/||;t" \
621	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
622	case $$dist_files in \
623	  */*) $(MKDIR_P) `echo "$$dist_files" | \
624			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
625			   sort -u` ;; \
626	esac; \
627	for file in $$dist_files; do \
628	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
629	  if test -d $$d/$$file; then \
630	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
631	    if test -d "$(distdir)/$$file"; then \
632	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
633	    fi; \
634	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
635	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
636	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
637	    fi; \
638	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
639	  else \
640	    test -f "$(distdir)/$$file" \
641	    || cp -p $$d/$$file "$(distdir)/$$file" \
642	    || exit 1; \
643	  fi; \
644	done
645check-am: all-am
646check: check-am
647all-am: Makefile $(HEADERS)
648installdirs:
649install: install-am
650install-exec: install-exec-am
651install-data: install-data-am
652uninstall: uninstall-am
653
654install-am: all-am
655	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
656
657installcheck: installcheck-am
658install-strip:
659	if test -z '$(STRIP)'; then \
660	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
661	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
662	      install; \
663	else \
664	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
665	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
666	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
667	fi
668mostlyclean-generic:
669
670clean-generic:
671	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
672
673distclean-generic:
674	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
675	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
676	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
677
678maintainer-clean-generic:
679	@echo "This command is intended for maintainers to use"
680	@echo "it deletes files that may require special tools to rebuild."
681clean: clean-am
682
683clean-am: clean-generic clean-libtool mostlyclean-am
684
685distclean: distclean-am
686	-rm -f Makefile
687distclean-am: clean-am distclean-compile distclean-generic \
688	distclean-tags
689
690dvi: dvi-am
691
692dvi-am:
693
694html: html-am
695
696html-am:
697
698info: info-am
699
700info-am:
701
702install-data-am:
703
704install-dvi: install-dvi-am
705
706install-dvi-am:
707
708install-exec-am:
709
710install-html: install-html-am
711
712install-html-am:
713
714install-info: install-info-am
715
716install-info-am:
717
718install-man:
719
720install-pdf: install-pdf-am
721
722install-pdf-am:
723
724install-ps: install-ps-am
725
726install-ps-am:
727
728installcheck-am:
729
730maintainer-clean: maintainer-clean-am
731	-rm -f Makefile
732maintainer-clean-am: distclean-am maintainer-clean-generic
733
734mostlyclean: mostlyclean-am
735
736mostlyclean-am: mostlyclean-compile mostlyclean-generic \
737	mostlyclean-libtool
738
739pdf: pdf-am
740
741pdf-am:
742
743ps: ps-am
744
745ps-am:
746
747uninstall-am:
748
749.MAKE: install-am install-strip
750
751.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
752	clean-libtool ctags distclean distclean-compile \
753	distclean-generic distclean-libtool distclean-tags distdir dvi \
754	dvi-am html html-am info info-am install install-am \
755	install-data install-data-am install-dvi install-dvi-am \
756	install-exec install-exec-am install-html install-html-am \
757	install-info install-info-am install-man install-pdf \
758	install-pdf-am install-ps install-ps-am install-strip \
759	installcheck installcheck-am installdirs maintainer-clean \
760	maintainer-clean-generic mostlyclean mostlyclean-compile \
761	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
762	tags uninstall uninstall-am
763
764
765$(top_builddir)/tests/libtests.la:
766	cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la
767
768tune:
769	$(MAKE) $(AM_MAKEFLAGS) tuneup$(EXEEXT)
770	./tuneup
771
772allprogs: $(EXTRA_PROGRAMS)
773
774$(TUNE_MPN_SRCS_BASIC):
775	for i in $(TUNE_MPN_SRCS_BASIC); do \
776	  echo "#define TUNE_PROGRAM_BUILD 1" >$$i; \
777	  echo "#include \"mpn/generic/$$i\"" >>$$i; \
778	done
779
780divrem_1.c:
781	echo "#define TUNE_PROGRAM_BUILD 1"                >divrem_1.c
782	echo "#define __gmpn_divrem_1  mpn_divrem_1_tune" >>divrem_1.c
783	echo "#include \"mpn/generic/divrem_1.c\""        >>divrem_1.c
784
785mod_1.c:
786	echo "#define TUNE_PROGRAM_BUILD 1"          >mod_1.c
787	echo "#define __gmpn_mod_1  mpn_mod_1_tune" >>mod_1.c
788	echo "#include \"mpn/generic/mod_1.c\""     >>mod_1.c
789
790sqr_asm.asm: $(top_builddir)/mpn/sqr_basecase.asm
791	echo 'define(SQR_TOOM2_THRESHOLD_OVERRIDE,SQR_TOOM2_THRESHOLD_MAX)' >sqr_asm.asm
792	echo 'include(../mpn/sqr_basecase.asm)' >>sqr_asm.asm
793
794# FIXME: Should it depend on $(top_builddir)/fac_ui.h too?
795fac_ui.c: $(top_builddir)/mpz/fac_ui.c
796	echo "#define TUNE_PROGRAM_BUILD 1"          >fac_ui.c
797	echo "#define __gmpz_fac_ui mpz_fac_ui_tune" >>fac_ui.c
798	echo "#define __gmpz_oddfac_1 mpz_oddfac_1_tune" >>fac_ui.c
799	echo "#include \"mpz/oddfac_1.c\""           >>fac_ui.c
800	echo "#include \"mpz/fac_ui.c\""             >>fac_ui.c
801
802# .s assembler, no preprocessing.
803#
804.s.o:
805	$(CCAS) $(COMPILE_FLAGS) `test -f '$<' || echo '$(srcdir)/'`$<
806.s.obj:
807	$(CCAS) $(COMPILE_FLAGS) `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
808.s.lo:
809	$(LIBTOOL) --mode=compile --tag=CC $(CCAS) $(COMPILE_FLAGS) `test -f '$<' || echo '$(srcdir)/'`$<
810
811# .S assembler, preprocessed with cpp.
812#
813# It's necessary to run $(CPP) separately, since it seems not all compilers
814# recognise .S files, in particular "cc" on HP-UX 10 and 11 doesn't (and
815# will silently do nothing if given a .S).
816#
817# For .lo we need a helper script, as described below for .asm.lo.
818#
819.S.o:
820	$(CPP) $(PREPROCESS_FLAGS) `test -f '$<' || echo '$(srcdir)/'`$< | grep -v '^#' >tmp-$*.s
821	$(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@
822	$(RM_TMP) tmp-$*.s
823.S.obj:
824	$(CPP) $(PREPROCESS_FLAGS) `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` | grep -v '^#' >tmp-$*.s
825	$(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@
826	$(RM_TMP) tmp-$*.s
827.S.lo:
828	$(LIBTOOL) --mode=compile --tag=CC $(top_srcdir)/mpn/cpp-ccas --cpp="$(CPP) $(PREPROCESS_FLAGS)" $(CCAS) $(COMPILE_FLAGS) `test -f '$<' || echo '$(srcdir)/'`$<
829
830# .asm assembler, preprocessed with m4.
831#
832# .o and .obj are non-PIC and just need m4 followed by a compile.
833#
834# .lo is a bit tricky.  Libtool (as of version 1.5) has foo.lo as a little
835# text file, and .libs/foo.o and foo.o as the PIC and non-PIC objects,
836# respectively.  It'd be asking for lots of trouble to try to create foo.lo
837# ourselves, so instead arrange to invoke libtool like a --mode=compile, but
838# with a special m4-ccas script which first m4 preprocesses, then compiles.
839# --tag=CC is necessary since foo.asm is otherwise unknown to libtool.
840#
841# Libtool adds -DPIC when building a shared object and the .asm files look
842# for that.  But it should be noted that the other PIC flags are on occasion
843# important too, in particular FreeBSD 2.2.8 gas 1.92.3 requires -k before
844# it accepts PIC constructs like @GOT, and gcc adds that flag only under
845# -fPIC.  (Later versions of gas are happy to accept PIC stuff any time.)
846#
847.asm.o:
848	$(M4) -DOPERATION_$* `test -f '$<' || echo '$(srcdir)/'`$< >tmp-$*.s
849	$(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@
850	$(RM_TMP) tmp-$*.s
851.asm.obj:
852	$(M4) -DOPERATION_$* `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` >tmp-$*.s
853	$(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@
854	$(RM_TMP) tmp-$*.s
855.asm.lo:
856	$(LIBTOOL) --mode=compile --tag=CC $(top_srcdir)/mpn/m4-ccas --m4="$(M4)" $(CCAS) $(COMPILE_FLAGS) `test -f '$<' || echo '$(srcdir)/'`$<
857
858# Tell versions [3.59,3.63) of GNU make to not export all variables.
859# Otherwise a system limit (for SysV at least) may be exceeded.
860.NOEXPORT:
861