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.
189 lines
6.6 KiB
189 lines
6.6 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@
|
|
EXEEXT = @EXEEXT@
|
|
|
|
#### 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 = $(addsuffix ${EXEEXT},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_io 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${EXEEXT} tests${EXEEXT}
|
|
|
|
%.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${EXEEXT} : $(patsubst %,%.o,$(MODULES_exam))
|
|
tests${EXEEXT} : $(patsubst %,%.o,$(MODULES_tests))
|
|
timemul${EXEEXT} : $(patsubst %,%.o,$(MODULES_timemul))
|
|
timesquare${EXEEXT} : $(patsubst %,%.o,$(MODULES_timesquare))
|
|
timediv${EXEEXT} : $(patsubst %,%.o,$(MODULES_timediv))
|
|
timesqrt${EXEEXT} : $(patsubst %,%.o,$(MODULES_timesqrt))
|
|
timegcd${EXEEXT} : $(patsubst %,%.o,$(MODULES_timegcd))
|
|
timefact${EXEEXT} : $(patsubst %,%.o,$(MODULES_timefact))
|
|
timeprint${EXEEXT} : $(patsubst %,%.o,$(MODULES_timeprint))
|
|
timeLFsqrt${EXEEXT} : $(patsubst %,%.o,$(MODULES_timeLFsqrt))
|
|
timeRAtoLF${EXEEXT} : $(patsubst %,%.o,$(MODULES_timeRAtoLF))
|
|
timeLFRAmul${EXEEXT} : $(patsubst %,%.o,$(MODULES_timeLFRAmul))
|
|
timeRALFdiv${EXEEXT} : $(patsubst %,%.o,$(MODULES_timeRALFdiv))
|
|
timepi${EXEEXT} : $(patsubst %,%.o,$(MODULES_timepi))
|
|
timeexp1${EXEEXT} : $(patsubst %,%.o,$(MODULES_timeexp1))
|
|
timeeuler${EXEEXT} : $(patsubst %,%.o,$(MODULES_timeeuler))
|
|
timecatalan${EXEEXT} : $(patsubst %,%.o,$(MODULES_timecatalan))
|
|
timezeta3${EXEEXT} : $(patsubst %,%.o,$(MODULES_timezeta3))
|
|
timeLFln${EXEEXT} : $(patsubst %,%.o,$(MODULES_timeLFln))
|
|
timeLFexp${EXEEXT} : $(patsubst %,%.o,$(MODULES_timeLFexp))
|
|
timeLFsin${EXEEXT} : $(patsubst %,%.o,$(MODULES_timeLFsin))
|
|
timeLFcos${EXEEXT} : $(patsubst %,%.o,$(MODULES_timeLFcos))
|
|
timeLFsinh${EXEEXT} : $(patsubst %,%.o,$(MODULES_timeLFsinh))
|
|
timeLFcosh${EXEEXT} : $(patsubst %,%.o,$(MODULES_timeLFcosh))
|
|
timeLFatan${EXEEXT} : $(patsubst %,%.o,$(MODULES_timeLFatan))
|
|
timeLFatanh${EXEEXT} : $(patsubst %,%.o,$(MODULES_timeLFatanh))
|
|
timerecip2adic${EXEEXT} : $(patsubst %,%.o,$(MODULES_timerecip2adic))
|
|
timediv2adic${EXEEXT} : $(patsubst %,%.o,$(MODULES_timediv2adic))
|
|
timeMIpow2recip${EXEEXT} : $(patsubst %,%.o,$(MODULES_timeMIpow2recip))
|
|
timeMIpow2div${EXEEXT} : $(patsubst %,%.o,$(MODULES_timeMIpow2div))
|
|
timeMImisc5${EXEEXT} : $(patsubst %,%.o,$(MODULES_timeMImisc5))
|
|
timeUPMImul${EXEEXT} : $(patsubst %,%.o,$(MODULES_timeUPMImul))
|
|
timesqrtmodp${EXEEXT} : $(patsubst %,%.o,$(MODULES_timesqrtmodp))
|
|
main${EXEEXT} : $(patsubst %,%.o,$(MODULES_main))
|
|
${PROGRAMS} : %${EXEEXT} : ${LIBDEPS}
|
|
${LIBTOOL_LINK} ${CXX} ${CXXFLAGS} ${TARGET_ARCH} $(patsubst %,%.o,$(MODULES_$(*F))) ${LDFLAGS} ${LIBS} -o $@
|
|
|
|
|
|
install : all
|
|
|
|
installdirs :
|
|
|
|
uninstall :
|
|
|
|
check : all
|
|
./exam${EXEEXT}
|
|
./tests${EXEEXT}
|
|
|
|
mostlyclean : clean
|
|
|
|
clean : force
|
|
${RM} *.s *.o *.a exam tests${EXEEXT} main a.out core
|
|
${RM} -r .libs _libs
|
|
|
|
distclean : clean
|
|
${RM} config.status config.log config.cache Makefile
|
|
|
|
maintainer-clean : distclean
|
|
|
|
force :
|