Makefile.am revision 1.1.1.5
1## Process this file with automake to generate Makefile.in 2 3 4# Copyright 1991, 1993, 1994, 1996, 1997, 1999-2004, 2006-2009, 2011-2016, 5# 2018, 2020 Free Software Foundation, Inc. 6# 7# This file is part of the GNU MP Library. 8# 9# The GNU MP Library is free software; you can redistribute it and/or modify 10# it under the terms of either: 11# 12# * the GNU Lesser General Public License as published by the Free 13# Software Foundation; either version 3 of the License, or (at your 14# option) any later version. 15# 16# or 17# 18# * the GNU General Public License as published by the Free Software 19# Foundation; either version 2 of the License, or (at your option) any 20# later version. 21# 22# or both in parallel, as here. 23# 24# The GNU MP Library is distributed in the hope that it will be useful, but 25# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 26# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 27# for more details. 28# 29# You should have received copies of the GNU General Public License and the 30# GNU Lesser General Public License along with the GNU MP Library. If not, 31# see https://www.gnu.org/licenses/. 32 33 34# The following options are the same as AM_INIT_AUTOMAKE in configure.in, 35# except no $(top_builddir) on ansi2knr. That directory is wanted for the 36# Makefiles in subdirectories, but here we must omit it so automake gives 37# the actual ansi2knr build rule, not "cd $(top_builddir) && make ansi2knr". 38# 39# AUTOMAKE_OPTIONS = 1.8 gnu no-dependencies 40 41 42# Libtool -version-info for libgmp.la and libmp.la. See "Versioning" in the 43# libtool manual. 44# 45# CURRENT:REVISION:AGE 46# 47# 1. No interfaces changed, only implementations (good): Increment REVISION. 48# 49# 2. Interfaces added, none removed (good): Increment CURRENT, increment 50# AGE, set REVISION to 0. 51# 52# 3. Interfaces removed (BAD, breaks upward compatibility): Increment 53# CURRENT, set AGE and REVISION to 0. 54# 55# Do this separately for libgmp, libgmpxx and libmp, and only for releases. 56# 57# GMP -version-info 58# release libgmp libgmpxx libmp 59# 2.0.x - - - 60# 3.0 3:0:0 - 3:0:0 61# 3.0.1 3:1:0 - 3:0:0 62# 3.1 4:0:1 - 4:0:1 63# 3.1.1 4:1:1 - 4:1:1 64# 4.0 5:0:2 3:0:0 4:2:1 65# 4.0.1 5:1:2 3:1:0 4:3:1 66# 4.1 6:0:3 3:2:0 4:4:1 67# 4.1.1 6:1:3 3:3:0 4:5:1 68# 4.1.2 6:2:3 3:4:0 4:6:1 69# 4.1.3 6:3:3 3:5:0 4:7:1 70# 4.1.4 6:3:3 3:5:0 4:7:1 WRONG, same as 4.1.3! 71# 4.2 6:0:3 3:2:0 4:4:1 REALLY WRONG, same as 4.1! 72# 4.2.1 7:1:4 4:1:1 4:10:1 WRONG for libgmpxx 73# 4.2.2 7:2:4 4:2:0 4:11:1 74# 4.2.3 7:3:4 4:3:0 4:12:1 75# 4.2.4 7:4:4 4:4:0 4:13:1 76# 4.3.0 8:0:5 5:0:1 4:14:1 77# 4.3.1 8:1:5 5:1:1 4:15:1 WRONG Really used same as 4.3.0 78# 4.3.2 8:2:5 5:2:1 4:16:1 79# 5.0.0 9:0:6 6:0:2 4:20:1 Should have been 10:0:0 80# 5.0.1 10:1:0 6:1:2 4:21:1 81# 5.0.2 10:2:0 6:2:2 4:22:1 82# 5.0.3 10:3:0 6:3:2 4:23:1 83# 5.0.4 10:4:0 6:4:2 4:24:1 84# 5.0.5 10:5:0 6:5:2 4:25:1 85# 5.1.0 11:0:1 7:0:3 - 86# 5.1.1 11:1:1 7:1:3 - 87# 5.1.2 11:2:1 7:2:3 - 88# 6.0.0 12:0:2 8:0:4 - 89# 6.1.0 13:0:3 9:0:5 - 90# 6.1.1 13:1:3 9:1:5 - 91# 6.1.2 13:2:3 9:2:5 - 92# 6.2.0 14:0:4 10:0:6 - 93# 6.2.1 14:1:4 10:1:6 - 94# 95# Starting at 3:0:0 is a slight abuse of the versioning system, but it 96# ensures we're past soname libgmp.so.2, which was used on Debian GNU/Linux 97# packages of gmp 2. Pretend gmp 2 was 2:0:0, so the interface changes for 98# gmp 3 mean 3:0:0 is right. 99# 100# We interpret "implementation changed" in item "1." above as meaning any 101# release, ie. the REVISION is incremented every time (if nothing else). 102# Even if we thought the code generated will be identical on all systems, 103# it's still good to get the shared library filename (like 104# libgmpxx.so.3.0.4) incrementing, to make it clear which GMP it's from. 105 106LIBGMP_LT_CURRENT = 14 107LIBGMP_LT_REVISION = 1 108LIBGMP_LT_AGE = 4 109 110LIBGMPXX_LT_CURRENT = 10 111LIBGMPXX_LT_REVISION = 1 112LIBGMPXX_LT_AGE = 6 113 114 115SUBDIRS = tests mpn mpz mpq mpf printf scanf rand cxx demos tune doc 116 117EXTRA_DIST = configfsf.guess configfsf.sub .gdbinit INSTALL.autoconf \ 118 COPYING.LESSERv3 COPYINGv2 COPYINGv3 119 120pkgconfigdir = $(libdir)/pkgconfig 121pkgconfig_DATA = gmp.pc 122 123# Put asl.h here for now. 124EXTRA_DIST += asl.h 125 126if WANT_CXX 127GMPXX_HEADERS_OPTION = gmpxx.h 128pkgconfig_DATA += gmpxx.pc 129endif 130EXTRA_DIST += gmpxx.h 131 132# gmp.h is architecture dependent, mainly since it encodes the limb size used 133# in libgmp. For that reason it belongs under $exec_prefix not $prefix, 134# strictly speaking. 135# 136# $exec_prefix/include is not in the default include path for gcc built to 137# the same $prefix and $exec_prefix, which might mean gmp.h is not found, 138# but anyone knowledgeable enough to be playing with exec_prefix will be able 139# to address that. 140# 141includeexecdir = $(exec_prefix)/include 142include_HEADERS = $(GMPXX_HEADERS_OPTION) 143nodist_includeexec_HEADERS = gmp.h 144lib_LTLIBRARIES = libgmp.la $(GMPXX_LTLIBRARIES_OPTION) 145 146BUILT_SOURCES = gmp.h 147 148DISTCLEANFILES = $(BUILT_SOURCES) config.m4 @gmp_srclinks@ 149 150# Tell gmp.h it's building gmp, not an application, used by windows DLL stuff. 151AM_CPPFLAGS=-D__GMP_WITHIN_GMP 152 153 154MPF_OBJECTS = mpf/init$U.lo mpf/init2$U.lo mpf/inits$U.lo mpf/set$U.lo \ 155 mpf/set_ui$U.lo mpf/set_si$U.lo mpf/set_str$U.lo mpf/set_d$U.lo \ 156 mpf/set_z$U.lo mpf/iset$U.lo mpf/iset_ui$U.lo mpf/iset_si$U.lo \ 157 mpf/iset_str$U.lo mpf/iset_d$U.lo mpf/clear$U.lo mpf/clears$U.lo \ 158 mpf/get_str$U.lo mpf/dump$U.lo mpf/size$U.lo mpf/eq$U.lo mpf/reldiff$U.lo \ 159 mpf/sqrt$U.lo mpf/random2$U.lo mpf/inp_str$U.lo mpf/out_str$U.lo \ 160 mpf/add$U.lo mpf/add_ui$U.lo mpf/sub$U.lo mpf/sub_ui$U.lo mpf/ui_sub$U.lo \ 161 mpf/mul$U.lo mpf/mul_ui$U.lo mpf/div$U.lo mpf/div_ui$U.lo mpf/cmp_z$U.lo \ 162 mpf/cmp$U.lo mpf/cmp_d$U.lo mpf/cmp_ui$U.lo mpf/cmp_si$U.lo \ 163 mpf/mul_2exp$U.lo mpf/div_2exp$U.lo mpf/abs$U.lo mpf/neg$U.lo \ 164 mpf/set_q$U.lo mpf/get_d$U.lo mpf/get_d_2exp$U.lo mpf/set_dfl_prec$U.lo \ 165 mpf/set_prc$U.lo mpf/set_prc_raw$U.lo mpf/get_dfl_prec$U.lo \ 166 mpf/get_prc$U.lo mpf/ui_div$U.lo mpf/sqrt_ui$U.lo \ 167 mpf/ceilfloor$U.lo mpf/trunc$U.lo mpf/pow_ui$U.lo \ 168 mpf/urandomb$U.lo mpf/swap$U.lo \ 169 mpf/fits_sint$U.lo mpf/fits_slong$U.lo mpf/fits_sshort$U.lo \ 170 mpf/fits_uint$U.lo mpf/fits_ulong$U.lo mpf/fits_ushort$U.lo \ 171 mpf/get_si$U.lo mpf/get_ui$U.lo \ 172 mpf/int_p$U.lo 173 174MPZ_OBJECTS = mpz/abs$U.lo mpz/add$U.lo mpz/add_ui$U.lo \ 175 mpz/aorsmul$U.lo mpz/aorsmul_i$U.lo mpz/and$U.lo mpz/array_init$U.lo \ 176 mpz/bin_ui$U.lo mpz/bin_uiui$U.lo \ 177 mpz/cdiv_q$U.lo mpz/cdiv_q_ui$U.lo \ 178 mpz/cdiv_qr$U.lo mpz/cdiv_qr_ui$U.lo \ 179 mpz/cdiv_r$U.lo mpz/cdiv_r_ui$U.lo mpz/cdiv_ui$U.lo \ 180 mpz/cfdiv_q_2exp$U.lo mpz/cfdiv_r_2exp$U.lo \ 181 mpz/clear$U.lo mpz/clears$U.lo mpz/clrbit$U.lo \ 182 mpz/cmp$U.lo mpz/cmp_d$U.lo mpz/cmp_si$U.lo mpz/cmp_ui$U.lo \ 183 mpz/cmpabs$U.lo mpz/cmpabs_d$U.lo mpz/cmpabs_ui$U.lo \ 184 mpz/com$U.lo mpz/combit$U.lo \ 185 mpz/cong$U.lo mpz/cong_2exp$U.lo mpz/cong_ui$U.lo \ 186 mpz/divexact$U.lo mpz/divegcd$U.lo mpz/dive_ui$U.lo \ 187 mpz/divis$U.lo mpz/divis_ui$U.lo mpz/divis_2exp$U.lo mpz/dump$U.lo \ 188 mpz/export$U.lo mpz/mfac_uiui$U.lo \ 189 mpz/2fac_ui$U.lo mpz/fac_ui$U.lo mpz/oddfac_1$U.lo mpz/prodlimbs$U.lo \ 190 mpz/fdiv_q_ui$U.lo mpz/fdiv_qr$U.lo mpz/fdiv_qr_ui$U.lo \ 191 mpz/fdiv_r$U.lo mpz/fdiv_r_ui$U.lo mpz/fdiv_q$U.lo \ 192 mpz/fdiv_ui$U.lo mpz/fib_ui$U.lo mpz/fib2_ui$U.lo mpz/fits_sint$U.lo \ 193 mpz/fits_slong$U.lo mpz/fits_sshort$U.lo mpz/fits_uint$U.lo \ 194 mpz/fits_ulong$U.lo mpz/fits_ushort$U.lo mpz/gcd$U.lo \ 195 mpz/gcd_ui$U.lo mpz/gcdext$U.lo mpz/get_d$U.lo mpz/get_d_2exp$U.lo \ 196 mpz/get_si$U.lo mpz/get_str$U.lo mpz/get_ui$U.lo mpz/getlimbn$U.lo \ 197 mpz/hamdist$U.lo \ 198 mpz/import$U.lo mpz/init$U.lo mpz/init2$U.lo mpz/inits$U.lo \ 199 mpz/inp_raw$U.lo mpz/inp_str$U.lo mpz/invert$U.lo \ 200 mpz/ior$U.lo mpz/iset$U.lo mpz/iset_d$U.lo mpz/iset_si$U.lo \ 201 mpz/iset_str$U.lo mpz/iset_ui$U.lo mpz/jacobi$U.lo mpz/kronsz$U.lo \ 202 mpz/kronuz$U.lo mpz/kronzs$U.lo mpz/kronzu$U.lo \ 203 mpz/lcm$U.lo mpz/lcm_ui$U.lo mpz/limbs_finish$U.lo \ 204 mpz/limbs_modify$U.lo mpz/limbs_read$U.lo mpz/limbs_write$U.lo \ 205 mpz/lucmod$U.lo mpz/lucnum_ui$U.lo mpz/lucnum2_ui$U.lo \ 206 mpz/millerrabin$U.lo mpz/mod$U.lo mpz/mul$U.lo mpz/mul_2exp$U.lo \ 207 mpz/mul_si$U.lo mpz/mul_ui$U.lo \ 208 mpz/n_pow_ui$U.lo mpz/neg$U.lo mpz/nextprime$U.lo \ 209 mpz/out_raw$U.lo mpz/out_str$U.lo mpz/perfpow$U.lo mpz/perfsqr$U.lo \ 210 mpz/popcount$U.lo mpz/pow_ui$U.lo mpz/powm$U.lo mpz/powm_sec$U.lo \ 211 mpz/powm_ui$U.lo mpz/primorial_ui$U.lo \ 212 mpz/pprime_p$U.lo mpz/random$U.lo mpz/random2$U.lo \ 213 mpz/realloc$U.lo mpz/realloc2$U.lo mpz/remove$U.lo mpz/roinit_n$U.lo \ 214 mpz/root$U.lo mpz/rootrem$U.lo mpz/rrandomb$U.lo mpz/scan0$U.lo \ 215 mpz/scan1$U.lo mpz/set$U.lo mpz/set_d$U.lo mpz/set_f$U.lo \ 216 mpz/set_q$U.lo mpz/set_si$U.lo mpz/set_str$U.lo mpz/set_ui$U.lo \ 217 mpz/setbit$U.lo \ 218 mpz/size$U.lo mpz/sizeinbase$U.lo mpz/sqrt$U.lo \ 219 mpz/sqrtrem$U.lo mpz/stronglucas$U.lo mpz/sub$U.lo \ 220 mpz/sub_ui$U.lo mpz/swap$U.lo \ 221 mpz/tdiv_ui$U.lo mpz/tdiv_q$U.lo mpz/tdiv_q_2exp$U.lo \ 222 mpz/tdiv_q_ui$U.lo mpz/tdiv_qr$U.lo mpz/tdiv_qr_ui$U.lo \ 223 mpz/tdiv_r$U.lo mpz/tdiv_r_2exp$U.lo mpz/tdiv_r_ui$U.lo \ 224 mpz/tstbit$U.lo mpz/ui_pow_ui$U.lo mpz/ui_sub$U.lo mpz/urandomb$U.lo \ 225 mpz/urandomm$U.lo mpz/xor$U.lo 226 227MPQ_OBJECTS = mpq/abs$U.lo mpq/aors$U.lo \ 228 mpq/canonicalize$U.lo mpq/clear$U.lo mpq/clears$U.lo \ 229 mpq/cmp$U.lo mpq/cmp_si$U.lo mpq/cmp_ui$U.lo mpq/div$U.lo \ 230 mpq/get_d$U.lo mpq/get_den$U.lo mpq/get_num$U.lo mpq/get_str$U.lo \ 231 mpq/init$U.lo mpq/inits$U.lo mpq/inp_str$U.lo mpq/inv$U.lo \ 232 mpq/md_2exp$U.lo mpq/mul$U.lo mpq/neg$U.lo mpq/out_str$U.lo \ 233 mpq/set$U.lo mpq/set_den$U.lo mpq/set_num$U.lo \ 234 mpq/set_si$U.lo mpq/set_str$U.lo mpq/set_ui$U.lo \ 235 mpq/equal$U.lo mpq/set_z$U.lo mpq/set_d$U.lo \ 236 mpq/set_f$U.lo mpq/swap$U.lo 237 238MPN_OBJECTS = mpn/fib_table$U.lo mpn/mp_bases$U.lo 239 240PRINTF_OBJECTS = \ 241 printf/asprintf$U.lo printf/asprntffuns$U.lo \ 242 printf/doprnt$U.lo printf/doprntf$U.lo printf/doprnti$U.lo \ 243 printf/fprintf$U.lo \ 244 printf/obprintf$U.lo printf/obvprintf$U.lo printf/obprntffuns$U.lo \ 245 printf/printf$U.lo printf/printffuns$U.lo \ 246 printf/snprintf$U.lo printf/snprntffuns$U.lo \ 247 printf/sprintf$U.lo printf/sprintffuns$U.lo \ 248 printf/vasprintf$U.lo printf/vfprintf$U.lo printf/vprintf$U.lo \ 249 printf/vsnprintf$U.lo printf/vsprintf$U.lo \ 250 printf/repl-vsnprintf$U.lo 251 252SCANF_OBJECTS = \ 253 scanf/doscan$U.lo scanf/fscanf$U.lo scanf/fscanffuns$U.lo \ 254 scanf/scanf$U.lo scanf/sscanf$U.lo scanf/sscanffuns$U.lo \ 255 scanf/vfscanf$U.lo scanf/vscanf$U.lo scanf/vsscanf$U.lo 256 257RANDOM_OBJECTS = \ 258 rand/rand$U.lo rand/randclr$U.lo rand/randdef$U.lo rand/randiset$U.lo \ 259 rand/randlc2s$U.lo rand/randlc2x$U.lo rand/randmt$U.lo \ 260 rand/randmts$U.lo rand/rands$U.lo rand/randsd$U.lo rand/randsdui$U.lo \ 261 rand/randbui$U.lo rand/randmui$U.lo 262 263# no $U for C++ files 264CXX_OBJECTS = \ 265 cxx/isfuns.lo cxx/ismpf.lo cxx/ismpq.lo cxx/ismpz.lo cxx/ismpznw.lo \ 266 cxx/limits.lo cxx/osdoprnti.lo cxx/osfuns.lo \ 267 cxx/osmpf.lo cxx/osmpq.lo cxx/osmpz.lo 268 269# In libtool 1.5 it doesn't work to build libgmp.la from the convenience 270# libraries like mpz/libmpz.la. Or rather it works, but it ends up putting 271# PIC objects into libgmp.a if shared and static are both built. (The PIC 272# objects go into mpz/.libs/libmpz.a, and thence into .libs/libgmp.a.) 273# 274# For now the big lists of objects above are used. Something like mpz/*.lo 275# would probably work, but might risk missing something out or getting 276# something extra. The source files for each .lo are listed in the 277# Makefile.am's in the subdirectories. 278# 279# Currently, for libgmp, unlike libmp below, we're not using 280# -export-symbols, since the tune and speed programs, and perhaps some of 281# the test programs, want to access undocumented symbols. 282 283libgmp_la_SOURCES = gmp-impl.h longlong.h \ 284 assert.c compat.c errno.c extract-dbl.c invalid.c memory.c \ 285 mp_bpl.c mp_clz_tab.c mp_dv_tab.c mp_minv_tab.c mp_get_fns.c mp_set_fns.c \ 286 version.c nextprime.c primesieve.c 287EXTRA_libgmp_la_SOURCES = tal-debug.c tal-notreent.c tal-reent.c 288libgmp_la_DEPENDENCIES = @TAL_OBJECT@ \ 289 $(MPF_OBJECTS) $(MPZ_OBJECTS) $(MPQ_OBJECTS) \ 290 $(MPN_OBJECTS) @mpn_objs_in_libgmp@ \ 291 $(PRINTF_OBJECTS) $(SCANF_OBJECTS) $(RANDOM_OBJECTS) 292libgmp_la_LIBADD = $(libgmp_la_DEPENDENCIES) 293libgmp_la_LDFLAGS = $(GMP_LDFLAGS) $(LIBGMP_LDFLAGS) \ 294 -version-info $(LIBGMP_LT_CURRENT):$(LIBGMP_LT_REVISION):$(LIBGMP_LT_AGE) 295 296 297# We need at least one .cc file in $(libgmpxx_la_SOURCES) so automake will 298# use $(CXXLINK) rather than the plain C $(LINK). cxx/dummy.cc is that 299# file. 300 301if WANT_CXX 302GMPXX_LTLIBRARIES_OPTION = libgmpxx.la 303endif 304libgmpxx_la_SOURCES = cxx/dummy.cc 305libgmpxx_la_DEPENDENCIES = $(CXX_OBJECTS) libgmp.la 306libgmpxx_la_LIBADD = $(libgmpxx_la_DEPENDENCIES) 307libgmpxx_la_LDFLAGS = $(GMP_LDFLAGS) $(LIBGMPXX_LDFLAGS) \ 308 -version-info $(LIBGMPXX_LT_CURRENT):$(LIBGMPXX_LT_REVISION):$(LIBGMPXX_LT_AGE) 309 310 311 312install-data-hook: 313 @echo '' 314 @echo '+-------------------------------------------------------------+' 315 @echo '| CAUTION: |' 316 @echo '| |' 317 @echo '| If you have not already run "make check", then we strongly |' 318 @echo '| recommend you do so. |' 319 @echo '| |' 320 @echo '| GMP has been carefully tested by its authors, but compilers |' 321 @echo '| are all too often released with serious bugs. GMP tends to |' 322 @echo '| explore interesting corners in compilers and has hit bugs |' 323 @echo '| on quite a few occasions. |' 324 @echo '| |' 325 @echo '+-------------------------------------------------------------+' 326 @echo '' 327 328 329# The "test -f" support for srcdir!=builddir is similar to the automake .c.o 330# etc rules, but with each foo.c explicitly, since $< is not portable 331# outside an inference rule. 332# 333# A quoted 'foo.c' is used with the "test -f"'s to avoid Sun make rewriting 334# it as part of its VPATH support. See the autoconf manual "Limitations of 335# Make". 336# 337# Generated .h files which are used by gmp-impl.h are BUILT_SOURCES since 338# they must exist before anything can be compiled. 339# 340# Other generated .h files are also BUILT_SOURCES so as to get all the 341# build-system stuff over and done with at the start. Also, dependencies on 342# the .h files are not properly expressed for the various objects that use 343# them. 344 345EXTRA_DIST += bootstrap.c 346 347fac_table.h: gen-fac$(EXEEXT_FOR_BUILD) 348 ./gen-fac $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >fac_table.h || (rm -f fac_table.h; exit 1) 349BUILT_SOURCES += fac_table.h 350 351gen-fac$(EXEEXT_FOR_BUILD): gen-fac$(U_FOR_BUILD).c bootstrap.c 352 $(CC_FOR_BUILD) `test -f 'gen-fac$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-fac$(U_FOR_BUILD).c -o gen-fac$(EXEEXT_FOR_BUILD) 353DISTCLEANFILES += gen-fac$(EXEEXT_FOR_BUILD) 354EXTRA_DIST += gen-fac.c 355 356 357fib_table.h: gen-fib$(EXEEXT_FOR_BUILD) 358 ./gen-fib header $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >fib_table.h || (rm -f fib_table.h; exit 1) 359BUILT_SOURCES += fib_table.h 360 361mpn/fib_table.c: gen-fib$(EXEEXT_FOR_BUILD) 362 ./gen-fib table $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >mpn/fib_table.c || (rm -f mpn/fib_table.c; exit 1) 363BUILT_SOURCES += mpn/fib_table.c 364 365gen-fib$(EXEEXT_FOR_BUILD): gen-fib$(U_FOR_BUILD).c bootstrap.c 366 $(CC_FOR_BUILD) `test -f 'gen-fib$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-fib$(U_FOR_BUILD).c -o gen-fib$(EXEEXT_FOR_BUILD) 367DISTCLEANFILES += gen-fib$(EXEEXT_FOR_BUILD) 368EXTRA_DIST += gen-fib.c 369 370 371mp_bases.h: gen-bases$(EXEEXT_FOR_BUILD) 372 ./gen-bases header $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >mp_bases.h || (rm -f mp_bases.h; exit 1) 373BUILT_SOURCES += mp_bases.h 374 375mpn/mp_bases.c: gen-bases$(EXEEXT_FOR_BUILD) 376 ./gen-bases table $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >mpn/mp_bases.c || (rm -f mpn/mp_bases.c; exit 1) 377BUILT_SOURCES += mpn/mp_bases.c 378 379gen-bases$(EXEEXT_FOR_BUILD): gen-bases$(U_FOR_BUILD).c bootstrap.c 380 $(CC_FOR_BUILD) `test -f 'gen-bases$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-bases$(U_FOR_BUILD).c -o gen-bases$(EXEEXT_FOR_BUILD) $(LIBM_FOR_BUILD) 381DISTCLEANFILES += gen-bases$(EXEEXT_FOR_BUILD) 382EXTRA_DIST += gen-bases.c 383 384 385trialdivtab.h: gen-trialdivtab$(EXEEXT_FOR_BUILD) 386 ./gen-trialdivtab $(GMP_LIMB_BITS) 8000 >trialdivtab.h || (rm -f trialdivtab.h; exit 1) 387BUILT_SOURCES += trialdivtab.h 388 389gen-trialdivtab$(EXEEXT_FOR_BUILD): gen-trialdivtab$(U_FOR_BUILD).c bootstrap.c 390 $(CC_FOR_BUILD) `test -f 'gen-trialdivtab$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-trialdivtab$(U_FOR_BUILD).c -o gen-trialdivtab$(EXEEXT_FOR_BUILD) $(LIBM_FOR_BUILD) 391DISTCLEANFILES += gen-trialdivtab$(EXEEXT_FOR_BUILD) 392EXTRA_DIST += gen-trialdivtab.c 393 394 395mpn/jacobitab.h: gen-jacobitab$(EXEEXT_FOR_BUILD) 396 ./gen-jacobitab >mpn/jacobitab.h || (rm -f mpn/jacobitab.h; exit 1) 397BUILT_SOURCES += mpn/jacobitab.h 398 399gen-jacobitab$(EXEEXT_FOR_BUILD): gen-jacobitab$(U_FOR_BUILD).c 400 $(CC_FOR_BUILD) `test -f 'gen-jacobitab$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-jacobitab$(U_FOR_BUILD).c -o gen-jacobitab$(EXEEXT_FOR_BUILD) 401DISTCLEANFILES += gen-jacobitab$(EXEEXT_FOR_BUILD) 402EXTRA_DIST += gen-jacobitab.c 403 404 405mpn/perfsqr.h: gen-psqr$(EXEEXT_FOR_BUILD) 406 ./gen-psqr $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >mpn/perfsqr.h || (rm -f mpn/perfsqr.h; exit 1) 407BUILT_SOURCES += mpn/perfsqr.h 408 409gen-psqr$(EXEEXT_FOR_BUILD): gen-psqr$(U_FOR_BUILD).c bootstrap.c 410 $(CC_FOR_BUILD) `test -f 'gen-psqr$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-psqr$(U_FOR_BUILD).c -o gen-psqr$(EXEEXT_FOR_BUILD) $(LIBM_FOR_BUILD) 411DISTCLEANFILES += gen-psqr$(EXEEXT_FOR_BUILD) 412EXTRA_DIST += gen-psqr.c 413 414# Distribute mini-gmp. Test sources copied by dist-hook. 415EXTRA_DIST += mini-gmp/README mini-gmp/mini-gmp.c mini-gmp/mini-gmp.h \ 416 mini-gmp/ChangeLog mini-gmp/mini-mpq.c mini-gmp/mini-mpq.h \ 417 mini-gmp/tests/Makefile mini-gmp/tests/run-tests 418 419# Avoid: CVS - cvs directories 420# *~ - emacs backups 421# .#* - cvs merge originals 422# 423# *~ and .#* only occur when a whole directory without it's own Makefile.am 424# is distributed, like "doc" or the mpn cpu subdirectories. 425# 426dist-hook: 427 -find $(distdir) \( -name CVS -type d \) -o -name "*~" -o -name ".#*" \ 428 | xargs rm -rf 429 cp "$(srcdir)"/mini-gmp/tests/*.[ch] "$(distdir)/mini-gmp/tests" 430# grep -F $(VERSION) $(srcdir)/Makefile.am \ 431# | grep -q "^# *$(VERSION) *$(LIBGMP_LT_CURRENT):$(LIBGMP_LT_REVISION):$(LIBGMP_LT_AGE) *$(LIBGMPXX_LT_CURRENT):$(LIBGMPXX_LT_REVISION):$(LIBGMPXX_LT_AGE)" 432# test -z "`sed -n 's/^# *[0-9]*\.[0-9]*\.[0-9]* *\([0-9]*:[0-9]*:[0-9]*\) *\([0-9]*:[0-9]*:[0-9]*\) *\([0-9]*:[0-9]*:[0-9]*\).*/A\1\nB\2\nC\3/p' $(srcdir)/Makefile.am | grep -v 'A6:3:3\|B3:5:0\|C4:7:1' | sort | uniq -d`" 433 434.PHONY: check-mini-gmp clean-mini-gmp 435 436check-mini-gmp: 437 abs_srcdir="`cd $(srcdir) && pwd`" ; \ 438 $(MKDIR_P) mini-gmp/tests \ 439 && cd mini-gmp/tests \ 440 && TEST_SHLIB_DIR="${abs_top_builddir}/.libs" \ 441 $(MAKE) -f "$$abs_srcdir/mini-gmp/tests/Makefile" \ 442 VPATH="$$abs_srcdir/mini-gmp/tests" \ 443 srcdir="$$abs_srcdir/mini-gmp/tests" \ 444 MINI_GMP_DIR="$$abs_srcdir/mini-gmp" \ 445 LDFLAGS="-L../../.libs" \ 446 LIBS="-lgmp -lm" \ 447 CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS) -I../.." check 448 449clean-mini-gmp: 450 if [ -d mini-gmp/tests ] ; then \ 451 abs_srcdir="`cd $(srcdir) && pwd`" ; \ 452 cd mini-gmp/tests \ 453 && $(MAKE) -f "$$abs_srcdir/mini-gmp/tests/Makefile" clean ; \ 454 fi 455 456clean-local: clean-mini-gmp 457distclean-local: clean-mini-gmp 458