You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

186 lines
6.1 KiB

25 years ago
25 years ago
25 years ago
  1. # Makefile for cln/tests
  2. #### Start of system configuration section. ####
  3. # Directories used by "make":
  4. srcdir = @srcdir@
  5. top_srcdir = @top_srcdir@
  6. # Programs used by "make":
  7. # C compiler
  8. CC = @CC@
  9. CFLAGS = @CFLAGS@
  10. CPP = @CPP@
  11. # C++ compiler
  12. CXX = @CXX@
  13. CXXFLAGS = @CXXFLAGS@
  14. CXXCPP = @CXXCPP@
  15. INCLUDES = -I../include -I$(top_srcdir)/include -I$(srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src/base -I$(top_srcdir)/src/float -I$(top_srcdir)/src/float/lfloat -I$(top_srcdir)/src/integer -I$(top_srcdir)/src/base/random -I$(top_srcdir)/src/base/digitseq -I$(top_srcdir)/src/base/digit -I../src/base -I$(top_srcdir)/src/base
  16. CPPFLAGS += $(INCLUDES)
  17. LIBTOOL = @LIBTOOL@
  18. LIBTOOL_LINK = $(LIBTOOL) --mode=link
  19. MV = mv
  20. LN = ln
  21. RM = rm -f
  22. @SET_MAKE@
  23. #### End of system configuration section. ####
  24. SHELL = /bin/sh
  25. # Needed by $(LIBTOOL).
  26. top_builddir = ..
  27. VPATH = $(srcdir)
  28. FILES_CC := $(notdir $(wildcard $(srcdir)/*.cc))
  29. FILES_CC := $(filter-out %.i.cc, $(FILES_CC))
  30. FILES_I_CC := $(patsubst %.cc,%.i.cc,$(FILES_CC))
  31. FILES_S := $(patsubst %.cc,%.s,$(FILES_CC))
  32. FILES_O := $(patsubst %.cc,%.o,$(FILES_CC))
  33. OBJECTS = $(FILES_O)
  34. LIBS = ../src/libcln.la -lm
  35. LIBDEPS = ../src/libcln.la
  36. PROGRAMS = exam tests timemul timesquare timediv timesqrt timegcd timefact timeprint timeLFsqrt timeRAtoLF timeLFRAmul timeRALFdiv timepi timeexp1 timeeuler timecatalan timezeta3 timeLFln timeLFexp timeLFsin timeLFcos timeLFsinh timeLFcosh timeLFatan timeLFatanh timerecip2adic timediv2adic timeMIpow2recip timeMIpow2div timeMImisc5 timeUPMImul timesqrtmodp main
  37. MODULES_exam = exam exam_I exam_RA exam_SF exam_FF exam_DF exam_LF exam_I_gcd exam_I_sqrtp
  38. MODULES_tests = tests \
  39. test_I \
  40. test_I_abs test_I_compare test_I_plus test_I_minus test_I_plus1 test_I_minus1 test_I_mul test_I_div \
  41. test_I_gcd test_I_xgcd \
  42. test_I_ash test_I_evenp test_I_oddp test_I_lognot test_I_logand test_I_logandc1 test_I_logandc2 test_I_logior test_I_logorc1 test_I_logorc2 test_I_logxor test_I_lognand test_I_lognor test_I_logeqv test_I_boole test_I_logbitp test_I_logtest test_I_ldb test_I_ldbtest test_I_mkf test_I_dpb test_I_dpf test_I_logcount test_I_ilength test_I_ord2 test_I_power2p \
  43. test_I_isqrt test_I_sqrtp \
  44. test_I_GV \
  45. test_MI \
  46. test_MI_canonhom test_MI_plus test_MI_minus test_MI_mul test_MI_recip test_MI_div test_MI_expt \
  47. test_nt \
  48. test_nt_jacobi
  49. MODULES_timemul = timemul
  50. MODULES_timesquare = timesquare
  51. MODULES_timediv = timediv
  52. MODULES_timesqrt = timesqrt
  53. MODULES_timegcd = timegcd
  54. MODULES_timefact = timefact
  55. MODULES_timeprint = timeprint
  56. MODULES_timeLFsqrt = timeLFsqrt
  57. MODULES_timeRAtoLF = timeRAtoLF
  58. MODULES_timeLFRAmul = timeLFRAmul
  59. MODULES_timeRALFdiv = timeRALFdiv
  60. MODULES_timepi = timepi
  61. MODULES_timeexp1 = timeexp1
  62. MODULES_timeeuler = timeeuler
  63. MODULES_timecatalan = timecatalan
  64. MODULES_timezeta3 = timezeta3
  65. MODULES_timeLFln = timeLFln
  66. MODULES_timeLFexp = timeLFexp
  67. MODULES_timeLFsin = timeLFsin
  68. MODULES_timeLFcos = timeLFcos
  69. MODULES_timeLFsinh = timeLFsinh
  70. MODULES_timeLFcosh = timeLFcosh
  71. MODULES_timeLFatan = timeLFatan
  72. MODULES_timeLFatanh = timeLFatanh
  73. MODULES_timerecip2adic = timerecip2adic
  74. MODULES_timediv2adic = timediv2adic
  75. MODULES_timeMIpow2recip = timeMIpow2recip
  76. MODULES_timeMIpow2div = timeMIpow2div
  77. MODULES_timeMImisc5 = timeMImisc5
  78. MODULES_timeUPMImul = timeUPMImul
  79. MODULES_timesqrtmodp = timesqrtmodp
  80. MODULES_main = main
  81. all : exam tests
  82. %.s : %.c
  83. $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -S $< -o $@
  84. %.s : %.cc
  85. $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -S $< -o $@
  86. ifdef notyet
  87. %.o : %.c
  88. $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
  89. %.o : %.cc
  90. $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
  91. else
  92. $(FILES_O) : %.o : %.s
  93. $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
  94. endif
  95. %.i : %.c
  96. $(CPP) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $< > $@
  97. %.i.cc : %.cc
  98. $(CXXCPP) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $< > $@
  99. ../src/libcln.a :
  100. cd ../src ; $(MAKE) libcln.a
  101. exam : $(patsubst %,%.o,$(MODULES_exam))
  102. tests : $(patsubst %,%.o,$(MODULES_tests))
  103. timemul : $(patsubst %,%.o,$(MODULES_timemul))
  104. timesquare : $(patsubst %,%.o,$(MODULES_timesquare))
  105. timediv : $(patsubst %,%.o,$(MODULES_timediv))
  106. timesqrt : $(patsubst %,%.o,$(MODULES_timesqrt))
  107. timegcd : $(patsubst %,%.o,$(MODULES_timegcd))
  108. timefact : $(patsubst %,%.o,$(MODULES_timefact))
  109. timeprint : $(patsubst %,%.o,$(MODULES_timeprint))
  110. timeLFsqrt : $(patsubst %,%.o,$(MODULES_timeLFsqrt))
  111. timeRAtoLF : $(patsubst %,%.o,$(MODULES_timeRAtoLF))
  112. timeLFRAmul : $(patsubst %,%.o,$(MODULES_timeLFRAmul))
  113. timeRALFdiv : $(patsubst %,%.o,$(MODULES_timeRALFdiv))
  114. timepi : $(patsubst %,%.o,$(MODULES_timepi))
  115. timeexp1 : $(patsubst %,%.o,$(MODULES_timeexp1))
  116. timeeuler : $(patsubst %,%.o,$(MODULES_timeeuler))
  117. timecatalan : $(patsubst %,%.o,$(MODULES_timecatalan))
  118. timezeta3 : $(patsubst %,%.o,$(MODULES_timezeta3))
  119. timeLFln : $(patsubst %,%.o,$(MODULES_timeLFln))
  120. timeLFexp : $(patsubst %,%.o,$(MODULES_timeLFexp))
  121. timeLFsin : $(patsubst %,%.o,$(MODULES_timeLFsin))
  122. timeLFcos : $(patsubst %,%.o,$(MODULES_timeLFcos))
  123. timeLFsinh : $(patsubst %,%.o,$(MODULES_timeLFsinh))
  124. timeLFcosh : $(patsubst %,%.o,$(MODULES_timeLFcosh))
  125. timeLFatan : $(patsubst %,%.o,$(MODULES_timeLFatan))
  126. timeLFatanh : $(patsubst %,%.o,$(MODULES_timeLFatanh))
  127. timerecip2adic : $(patsubst %,%.o,$(MODULES_timerecip2adic))
  128. timediv2adic : $(patsubst %,%.o,$(MODULES_timediv2adic))
  129. timeMIpow2recip : $(patsubst %,%.o,$(MODULES_timeMIpow2recip))
  130. timeMIpow2div : $(patsubst %,%.o,$(MODULES_timeMIpow2div))
  131. timeMImisc5 : $(patsubst %,%.o,$(MODULES_timeMImisc5))
  132. timeUPMImul : $(patsubst %,%.o,$(MODULES_timeUPMImul))
  133. timesqrtmodp : $(patsubst %,%.o,$(MODULES_timesqrtmodp))
  134. main : $(patsubst %,%.o,$(MODULES_main))
  135. $(PROGRAMS) : % : $(LIBDEPS)
  136. $(LIBTOOL_LINK) $(CXX) $(CXXFLAGS) $(TARGET_ARCH) $(patsubst %,%.o,$(MODULES_$(*F))) $(LDFLAGS) $(LIBS) -o $@
  137. install : all
  138. installdirs :
  139. uninstall :
  140. check : all
  141. ./exam
  142. ./tests
  143. mostlyclean : clean
  144. clean : force
  145. $(RM) *.s *.o *.a exam tests main a.out core
  146. distclean : clean
  147. $(RM) config.status config.log config.cache Makefile
  148. maintainer-clean : distclean
  149. force :