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.
188 lines
6.2 KiB
188 lines
6.2 KiB
# Makefile for cln/tests
|
|
|
|
#### Start of system configuration section. ####
|
|
|
|
# Directories used by "make":
|
|
srcdir = @srcdir@
|
|
top_srcdir = @top_srcdir@
|
|
|
|
# Programs used by "make":
|
|
# C compiler
|
|
CC = @CC@
|
|
CFLAGS = @CFLAGS@
|
|
CPP = @CPP@
|
|
CPPFLAGS = @CPPFLAGS@
|
|
# C++ compiler
|
|
CXX = @CXX@
|
|
CXXFLAGS = @CXXFLAGS@
|
|
CXXCPP = @CXXCPP@
|
|
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
|
|
override CPPFLAGS += $(INCLUDES)
|
|
LIBTOOL = @LIBTOOL@
|
|
LIBTOOL_LINK = $(LIBTOOL) --mode=link
|
|
MV = mv
|
|
LN = ln
|
|
RM = rm -f
|
|
@SET_MAKE@
|
|
|
|
#### End of system configuration section. ####
|
|
|
|
SHELL = /bin/sh
|
|
|
|
# Needed by $(LIBTOOL).
|
|
top_builddir = ..
|
|
|
|
VPATH = $(srcdir)
|
|
|
|
FILES_CC := $(notdir $(wildcard $(srcdir)/*.cc))
|
|
FILES_CC := $(filter-out %.i.cc, $(FILES_CC))
|
|
|
|
FILES_I_CC := $(patsubst %.cc,%.i.cc,$(FILES_CC))
|
|
|
|
FILES_S := $(patsubst %.cc,%.s,$(FILES_CC))
|
|
|
|
FILES_O := $(patsubst %.cc,%.o,$(FILES_CC))
|
|
|
|
OBJECTS = $(FILES_O)
|
|
|
|
LIBS = ../src/libcln.la -lm
|
|
LIBDEPS = ../src/libcln.la
|
|
|
|
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
|
|
MODULES_exam = exam exam_I exam_RA exam_SF exam_FF exam_DF exam_LF exam_I_gcd exam_I_sqrtp
|
|
MODULES_tests = tests \
|
|
test_I \
|
|
test_I_abs test_I_compare test_I_plus test_I_minus test_I_plus1 test_I_minus1 test_I_mul test_I_div \
|
|
test_I_gcd test_I_xgcd \
|
|
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 \
|
|
test_I_isqrt test_I_sqrtp \
|
|
test_I_GV \
|
|
test_MI \
|
|
test_MI_canonhom test_MI_plus test_MI_minus test_MI_mul test_MI_recip test_MI_div test_MI_expt \
|
|
test_nt \
|
|
test_nt_jacobi
|
|
MODULES_timemul = timemul
|
|
MODULES_timesquare = timesquare
|
|
MODULES_timediv = timediv
|
|
MODULES_timesqrt = timesqrt
|
|
MODULES_timegcd = timegcd
|
|
MODULES_timefact = timefact
|
|
MODULES_timeprint = timeprint
|
|
MODULES_timeLFsqrt = timeLFsqrt
|
|
MODULES_timeRAtoLF = timeRAtoLF
|
|
MODULES_timeLFRAmul = timeLFRAmul
|
|
MODULES_timeRALFdiv = timeRALFdiv
|
|
MODULES_timepi = timepi
|
|
MODULES_timeexp1 = timeexp1
|
|
MODULES_timeeuler = timeeuler
|
|
MODULES_timecatalan = timecatalan
|
|
MODULES_timezeta3 = timezeta3
|
|
MODULES_timeLFln = timeLFln
|
|
MODULES_timeLFexp = timeLFexp
|
|
MODULES_timeLFsin = timeLFsin
|
|
MODULES_timeLFcos = timeLFcos
|
|
MODULES_timeLFsinh = timeLFsinh
|
|
MODULES_timeLFcosh = timeLFcosh
|
|
MODULES_timeLFatan = timeLFatan
|
|
MODULES_timeLFatanh = timeLFatanh
|
|
MODULES_timerecip2adic = timerecip2adic
|
|
MODULES_timediv2adic = timediv2adic
|
|
MODULES_timeMIpow2recip = timeMIpow2recip
|
|
MODULES_timeMIpow2div = timeMIpow2div
|
|
MODULES_timeMImisc5 = timeMImisc5
|
|
MODULES_timeUPMImul = timeUPMImul
|
|
MODULES_timesqrtmodp = timesqrtmodp
|
|
MODULES_main = main
|
|
|
|
all : exam tests
|
|
|
|
%.s : %.c
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -S $< -o $@
|
|
|
|
%.s : %.cc
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -S $< -o $@
|
|
|
|
ifdef notyet
|
|
|
|
%.o : %.c
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
|
|
|
|
%.o : %.cc
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
|
|
|
|
else
|
|
|
|
$(FILES_O) : %.o : %.s
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
|
|
|
|
endif
|
|
|
|
%.i : %.c
|
|
$(CPP) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $< > $@
|
|
|
|
%.i.cc : %.cc
|
|
$(CXXCPP) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $< > $@
|
|
|
|
../src/libcln.a :
|
|
cd ../src ; $(MAKE) libcln.a
|
|
|
|
exam : $(patsubst %,%.o,$(MODULES_exam))
|
|
tests : $(patsubst %,%.o,$(MODULES_tests))
|
|
timemul : $(patsubst %,%.o,$(MODULES_timemul))
|
|
timesquare : $(patsubst %,%.o,$(MODULES_timesquare))
|
|
timediv : $(patsubst %,%.o,$(MODULES_timediv))
|
|
timesqrt : $(patsubst %,%.o,$(MODULES_timesqrt))
|
|
timegcd : $(patsubst %,%.o,$(MODULES_timegcd))
|
|
timefact : $(patsubst %,%.o,$(MODULES_timefact))
|
|
timeprint : $(patsubst %,%.o,$(MODULES_timeprint))
|
|
timeLFsqrt : $(patsubst %,%.o,$(MODULES_timeLFsqrt))
|
|
timeRAtoLF : $(patsubst %,%.o,$(MODULES_timeRAtoLF))
|
|
timeLFRAmul : $(patsubst %,%.o,$(MODULES_timeLFRAmul))
|
|
timeRALFdiv : $(patsubst %,%.o,$(MODULES_timeRALFdiv))
|
|
timepi : $(patsubst %,%.o,$(MODULES_timepi))
|
|
timeexp1 : $(patsubst %,%.o,$(MODULES_timeexp1))
|
|
timeeuler : $(patsubst %,%.o,$(MODULES_timeeuler))
|
|
timecatalan : $(patsubst %,%.o,$(MODULES_timecatalan))
|
|
timezeta3 : $(patsubst %,%.o,$(MODULES_timezeta3))
|
|
timeLFln : $(patsubst %,%.o,$(MODULES_timeLFln))
|
|
timeLFexp : $(patsubst %,%.o,$(MODULES_timeLFexp))
|
|
timeLFsin : $(patsubst %,%.o,$(MODULES_timeLFsin))
|
|
timeLFcos : $(patsubst %,%.o,$(MODULES_timeLFcos))
|
|
timeLFsinh : $(patsubst %,%.o,$(MODULES_timeLFsinh))
|
|
timeLFcosh : $(patsubst %,%.o,$(MODULES_timeLFcosh))
|
|
timeLFatan : $(patsubst %,%.o,$(MODULES_timeLFatan))
|
|
timeLFatanh : $(patsubst %,%.o,$(MODULES_timeLFatanh))
|
|
timerecip2adic : $(patsubst %,%.o,$(MODULES_timerecip2adic))
|
|
timediv2adic : $(patsubst %,%.o,$(MODULES_timediv2adic))
|
|
timeMIpow2recip : $(patsubst %,%.o,$(MODULES_timeMIpow2recip))
|
|
timeMIpow2div : $(patsubst %,%.o,$(MODULES_timeMIpow2div))
|
|
timeMImisc5 : $(patsubst %,%.o,$(MODULES_timeMImisc5))
|
|
timeUPMImul : $(patsubst %,%.o,$(MODULES_timeUPMImul))
|
|
timesqrtmodp : $(patsubst %,%.o,$(MODULES_timesqrtmodp))
|
|
main : $(patsubst %,%.o,$(MODULES_main))
|
|
$(PROGRAMS) : % : $(LIBDEPS)
|
|
$(LIBTOOL_LINK) $(CXX) $(CXXFLAGS) $(TARGET_ARCH) $(patsubst %,%.o,$(MODULES_$(*F))) $(LDFLAGS) $(LIBS) -o $@
|
|
|
|
|
|
install : all
|
|
|
|
installdirs :
|
|
|
|
uninstall :
|
|
|
|
check : all
|
|
./exam
|
|
./tests
|
|
|
|
mostlyclean : clean
|
|
|
|
clean : force
|
|
$(RM) *.s *.o *.a exam tests main a.out core
|
|
$(RM) -r .libs _libs
|
|
|
|
distclean : clean
|
|
$(RM) config.status config.log config.cache Makefile
|
|
|
|
maintainer-clean : distclean
|
|
|
|
force :
|