1 # Makefile for cln/tests
3 #### Start of system configuration section. ####
5 # Directories used by "make":
7 top_srcdir = @top_srcdir@
9 # Programs used by "make":
18 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 @GMP_INCLUDES@
19 CPPFLAGS += $(INCLUDES)
21 LIBTOOL_LINK = $(LIBTOOL) --mode=link
27 #### End of system configuration section. ####
31 # Needed by $(LIBTOOL).
36 FILES_CC := $(notdir $(wildcard $(srcdir)/*.cc))
37 FILES_CC := $(filter-out %.i.cc, $(FILES_CC))
39 FILES_I_CC := $(patsubst %.cc,%.i.cc,$(FILES_CC))
41 FILES_S := $(patsubst %.cc,%.s,$(FILES_CC))
43 FILES_O := $(patsubst %.cc,%.o,$(FILES_CC))
47 LIBS = ../src/libcln.la -lm
48 LIBDEPS = ../src/libcln.la
50 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
51 MODULES_exam = exam exam_I exam_RA exam_SF exam_FF exam_DF exam_LF exam_I_gcd exam_I_sqrtp
52 MODULES_tests = tests \
54 test_I_abs test_I_compare test_I_plus test_I_minus test_I_plus1 test_I_minus1 test_I_mul test_I_div \
55 test_I_gcd test_I_xgcd \
56 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 \
57 test_I_isqrt test_I_sqrtp \
60 test_MI_canonhom test_MI_plus test_MI_minus test_MI_mul test_MI_recip test_MI_div test_MI_expt \
63 MODULES_timemul = timemul
64 MODULES_timesquare = timesquare
65 MODULES_timediv = timediv
66 MODULES_timesqrt = timesqrt
67 MODULES_timegcd = timegcd
68 MODULES_timefact = timefact
69 MODULES_timeprint = timeprint
70 MODULES_timeLFsqrt = timeLFsqrt
71 MODULES_timeRAtoLF = timeRAtoLF
72 MODULES_timeLFRAmul = timeLFRAmul
73 MODULES_timeRALFdiv = timeRALFdiv
74 MODULES_timepi = timepi
75 MODULES_timeexp1 = timeexp1
76 MODULES_timeeuler = timeeuler
77 MODULES_timecatalan = timecatalan
78 MODULES_timezeta3 = timezeta3
79 MODULES_timeLFln = timeLFln
80 MODULES_timeLFexp = timeLFexp
81 MODULES_timeLFsin = timeLFsin
82 MODULES_timeLFcos = timeLFcos
83 MODULES_timeLFsinh = timeLFsinh
84 MODULES_timeLFcosh = timeLFcosh
85 MODULES_timeLFatan = timeLFatan
86 MODULES_timeLFatanh = timeLFatanh
87 MODULES_timerecip2adic = timerecip2adic
88 MODULES_timediv2adic = timediv2adic
89 MODULES_timeMIpow2recip = timeMIpow2recip
90 MODULES_timeMIpow2div = timeMIpow2div
91 MODULES_timeMImisc5 = timeMImisc5
92 MODULES_timeUPMImul = timeUPMImul
93 MODULES_timesqrtmodp = timesqrtmodp
99 $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -S $< -o $@
102 $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -S $< -o $@
107 $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
110 $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
114 $(FILES_O) : %.o : %.s
115 $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
120 $(CPP) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $< > $@
123 $(CXXCPP) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $< > $@
126 cd ../src ; $(MAKE) libcln.a
128 exam : $(patsubst %,%.o,$(MODULES_exam))
129 tests : $(patsubst %,%.o,$(MODULES_tests))
130 timemul : $(patsubst %,%.o,$(MODULES_timemul))
131 timesquare : $(patsubst %,%.o,$(MODULES_timesquare))
132 timediv : $(patsubst %,%.o,$(MODULES_timediv))
133 timesqrt : $(patsubst %,%.o,$(MODULES_timesqrt))
134 timegcd : $(patsubst %,%.o,$(MODULES_timegcd))
135 timefact : $(patsubst %,%.o,$(MODULES_timefact))
136 timeprint : $(patsubst %,%.o,$(MODULES_timeprint))
137 timeLFsqrt : $(patsubst %,%.o,$(MODULES_timeLFsqrt))
138 timeRAtoLF : $(patsubst %,%.o,$(MODULES_timeRAtoLF))
139 timeLFRAmul : $(patsubst %,%.o,$(MODULES_timeLFRAmul))
140 timeRALFdiv : $(patsubst %,%.o,$(MODULES_timeRALFdiv))
141 timepi : $(patsubst %,%.o,$(MODULES_timepi))
142 timeexp1 : $(patsubst %,%.o,$(MODULES_timeexp1))
143 timeeuler : $(patsubst %,%.o,$(MODULES_timeeuler))
144 timecatalan : $(patsubst %,%.o,$(MODULES_timecatalan))
145 timezeta3 : $(patsubst %,%.o,$(MODULES_timezeta3))
146 timeLFln : $(patsubst %,%.o,$(MODULES_timeLFln))
147 timeLFexp : $(patsubst %,%.o,$(MODULES_timeLFexp))
148 timeLFsin : $(patsubst %,%.o,$(MODULES_timeLFsin))
149 timeLFcos : $(patsubst %,%.o,$(MODULES_timeLFcos))
150 timeLFsinh : $(patsubst %,%.o,$(MODULES_timeLFsinh))
151 timeLFcosh : $(patsubst %,%.o,$(MODULES_timeLFcosh))
152 timeLFatan : $(patsubst %,%.o,$(MODULES_timeLFatan))
153 timeLFatanh : $(patsubst %,%.o,$(MODULES_timeLFatanh))
154 timerecip2adic : $(patsubst %,%.o,$(MODULES_timerecip2adic))
155 timediv2adic : $(patsubst %,%.o,$(MODULES_timediv2adic))
156 timeMIpow2recip : $(patsubst %,%.o,$(MODULES_timeMIpow2recip))
157 timeMIpow2div : $(patsubst %,%.o,$(MODULES_timeMIpow2div))
158 timeMImisc5 : $(patsubst %,%.o,$(MODULES_timeMImisc5))
159 timeUPMImul : $(patsubst %,%.o,$(MODULES_timeUPMImul))
160 timesqrtmodp : $(patsubst %,%.o,$(MODULES_timesqrtmodp))
161 main : $(patsubst %,%.o,$(MODULES_main))
162 $(PROGRAMS) : % : $(LIBDEPS)
163 $(LIBTOOL_LINK) $(CXX) $(CXXFLAGS) $(TARGET_ARCH) $(patsubst %,%.o,$(MODULES_$(*F))) $(LIBS) -o $@
179 $(RM) *.s *.o *.a exam tests main a.out core
182 $(RM) config.status config.log config.cache Makefile
184 maintainer-clean : distclean