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