Makefile.am.in 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. ## Makefile.am.in - process this file to produce Makefile.am
  2. ## Copyright (C) 2015-2019 Alex Vong
  3. ##
  4. ## This program is free software; you can redistribute it and/or
  5. ## modify it under the terms of the GNU General Public License
  6. ## as published by the Free Software Foundation; either version 2
  7. ## of the License, or (at your option) any later version.
  8. ##
  9. ## This program is distributed in the hope that it will be useful,
  10. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. ## GNU General Public License for more details.
  13. ##
  14. ## You should have received a copy of the GNU General Public License
  15. ## along with this program; if not, write to the Free Software Foundation,
  16. ## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  17. ACLOCAL_AMFLAGS = -I m4
  18. SRCS = @SRCS@
  19. TESTS = tests/spot-check tests/self-test tests/fermat-test
  20. dist_check_SCRIPTS = $(TESTS)
  21. EXTRA_DIST = src/primenet.py Makefile.am.in debian
  22. dist_noinst_SCRIPTS = bootstrap doc/manpage.pl scripts/mlucas.in
  23. dist_man_MANS = doc/mlucas.1
  24. bin_SCRIPTS = mlucas primenet
  25. mlucas: scripts/mlucas.in
  26. $(AM_V_GEN) $(SED) \
  27. -e 's,[@]pkglibexecdir[@],$(pkglibexecdir),g' \
  28. -e 's,[@]host_cpu[@],$(host_cpu),g' \
  29. < scripts/mlucas.in > mlucas \
  30. && $(CHMOD) +x mlucas
  31. primenet: src/primenet.py
  32. $(CP) src/primenet.py primenet
  33. pkglibexec_PROGRAMS =
  34. if BUILD_GENERIC_C
  35. pkglibexec_PROGRAMS += mlucas-generic-c
  36. mlucas_generic_c_SOURCES = $(SRCS)
  37. mlucas_generic_c_CFLAGS = $(EXTRACFLAGS)
  38. mlucas_generic_c_LIBS = $(EXTRALIBS)
  39. endif
  40. if BUILD_SSE2
  41. pkglibexec_PROGRAMS += mlucas-sse2
  42. mlucas_sse2_SOURCES = $(SRCS)
  43. mlucas_sse2_CPPFLAGS = -DUSE_SSE2
  44. mlucas_sse2_CFLAGS = $(EXTRACFLAGS) -msse2
  45. mlucas_sse2_LIBS = $(EXTRALIBS)
  46. endif
  47. if BUILD_AVX
  48. pkglibexec_PROGRAMS += mlucas-avx
  49. mlucas_avx_SOURCES = $(SRCS)
  50. mlucas_avx_CPPFLAGS = -DUSE_AVX
  51. mlucas_avx_CFLAGS = $(EXTRACFLAGS) -mavx
  52. mlucas_avx_LIBS = $(EXTRALIBS)
  53. endif
  54. if BUILD_AVX2
  55. pkglibexec_PROGRAMS += mlucas-avx2
  56. mlucas_avx2_SOURCES = $(SRCS)
  57. mlucas_avx2_CPPFLAGS = -DUSE_AVX2
  58. mlucas_avx2_CFLAGS = $(EXTRACFLAGS) -mavx2
  59. mlucas_avx2_LIBS = $(EXTRALIBS)
  60. endif
  61. if BUILD_AVX512
  62. pkglibexec_PROGRAMS += mlucas-avx512
  63. mlucas_avx512_SOURCES = $(SRCS)
  64. mlucas_avx512_CPPFLAGS = -DUSE_AVX512
  65. mlucas_avx512_CFLAGS = $(EXTRACFLAGS) -mavx512f -mavx512cd
  66. mlucas_avx512_LIBS = $(EXTRALIBS)
  67. endif
  68. if BUILD_ARM_V8_SIMD
  69. pkglibexec_PROGRAMS += mlucas-arm-v8-simd
  70. mlucas_arm_v8_simd_SOURCES = $(SRCS)
  71. mlucas_arm_v8_simd_CPPFLAGS = -DUSE_ARM_V8_SIMD
  72. mlucas_arm_v8_simd_CFLAGS = $(EXTRACFLAGS)
  73. mlucas_arm_v8_simd_LIBS = $(EXTRALIBS)
  74. endif
  75. MOSTLYCLEANFILES = *.cfg
  76. CLEANFILES = mlucas