File: Makefile.am

package info (click to toggle)
eclib 20221012-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,348 kB
  • sloc: cpp: 48,495; makefile: 259; sh: 127
file content (135 lines) | stat: -rw-r--r-- 4,504 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
## Process this file with automake to produce Makefile.in

prog_input_dir = $(srcdir)/in
if NO_MPFP
prog_output_dir = $(srcdir)/out_no_ntl
MPFP_SWITCH="-DNO_MPFP"
else
prog_output_dir = $(srcdir)/out_ntl
MPFP_SWITCH=
endif

LDFLAGS_BOOST = $(BOOST_LDFLAGS) $(BOOST_ASIO_LDFLAGS) $(BOOST_THREAD_LDFLAGS)
BOOST_LIBS = $(BOOST_ASIO_LIB) $(BOOST_THREAD_LIB) 

AM_CPPFLAGS     = -I$(top_srcdir)/libsrc $(FLINT_CFLAGS) $(NTL_CFLAGS) $(PARI_CFLAGS) $(BOOST_CPPFLAGS) $(MPFP_SWITCH) $(PTHREAD_CFLAGS)
AM_LDFLAGS         = $(FLINT_LDFLAGS) $(NTL_LDFLAGS) $(PARI_LDFLAGS) $(LDFLAGS_BOOST) $(PTHREAD_CFLAGS) $(PTHREAD_LDFLAGS)
LIBS            = $(top_builddir)/libsrc/libec.la $(FLINT_LIBS) $(PARI_LIBS) $(NTL_LIBS) $(BOOST_LIBS) $(PTHREAD_LIBS)

check_run = echo -n "Testing $${prog}..."; ./$${prog}$(EXEEXT) < $(prog_input_dir)/$${prog}.in > $${prog}.testout 2>/dev/null && echo "$${prog} completed" && diff $${prog}.testout $(prog_output_dir)/$${prog}.out || exit $$?


################ PROCS (conics & cubics programs) #################

PROCS_PROGS = solve_conic solve_legendre reduce_cubics list_cubics cubics
PROCS_PROGS_SUFFIXED = $(PROCS_PROGS:=$(EXEEXT))
procs_progs: $(PROCS_PROGS_SUFFIXED)

solve_conic_SOURCES=solve_conic.cc
solve_legendre_SOURCES=solve_legendre.cc
reduce_cubics_SOURCES=reduce_cubics.cc
list_cubics_SOURCES=list_cubics.cc
cubics_SOURCES=cubics.cc

check_procs: procs_progs
	@echo Checking conics and cubics programs...
	for prog in $(PROCS_PROGS); do $(check_run); done

################ QCURVES (elliptic curves programs, excluding two-descent) #################

QCURVES_PROGS = point_search indep_test
QCURVES_PROGS_SUFFIXED = $(QCURVES_PROGS:=$(EXEEXT))
qcurves_progs: $(QCURVES_PROGS_SUFFIXED)

point_search_SOURCES=point_search.cc
indep_test_SOURCES=indep_test.cc

check_qcurves: qcurves_progs
	@echo Checking qcurves programs...
	for prog in $(QCURVES_PROGS); do $(check_run); done

################ QCURVES (elliptic curves two-descent programs) #################

# When allprogs is disabled the only binary to be built and installed
# is mwrank, but we want "make check" to build and test all.

QRANK_PROGS = mwrank reduce_quartics quartic_points
QRANK_CHECK_PROGS = reduce_quartics quartic_points
QRANK_PROGS_SUFFIXED = $(QRANK_PROGS:=$(EXEEXT))
QRANK_CHECK_PROGS_SUFFIXED = $(QRANK_CHECK_PROGS:=$(EXEEXT))
qrank_progs: $(QRANK_PROGS_SUFFIXED)

mwrank_SOURCES=mwrank.cc
reduce_quartics_SOURCES=reduce_quartics.cc
quartic_points_SOURCES=quartic_points.cc

check_qrank: qrank_progs
	@echo Checking qrank programs...
	for prog in $(QRANK_PROGS); do $(check_run); done
	rm -f PRIMES 1

################ G0N (modular symbols programs) #################

G0N_PROGS = ecnf nfhpcurve nfhpmcurve h1first h1clist h1bsdcurisog qexp h1bsd h1curve pcurve checkap moreap nfcount aplist
G0N_PROGS_SUFFIXED = $(G0N_PROGS:=$(EXEEXT))
g0n_progs: $(G0N_PROGS_SUFFIXED)

h1bsd_SOURCES=h1bsd.cc
h1curve_SOURCES=h1curve.cc
pcurve_SOURCES=pcurve.cc
nfhpcurve_SOURCES=nfhpcurve.cc
nfhpmcurve_SOURCES=nfhpmcurve.cc
h1clist_SOURCES=h1clist.cc
checkap_SOURCES=checkap.cc
h1bsdcurisog_SOURCES=h1bsdcurisog.cc
nfcount_SOURCES=nfcount.cc
ecnf_SOURCES=ecnf.cc
h1first_SOURCES=h1first.cc
moreap_SOURCES=moreap.cc
qexp_SOURCES=qexp.cc
aplist_SOURCES=aplist.cc

# This is the name of a directory which will be used for newform
# input/output in the "make check" tests and removed afterwards.
# This does not work without the export!

export NF_DIR:=nftmp
export SNF_DIR:=snftmp
export TCURVE_DIR:=tcurves

check_g0n: g0n_progs
	@echo Checking g0n programs...
	rm -rf $(NF_DIR)
	rm -rf $(SNF_DIR)
	rm -rf $(TCURVE_DIR)
	mkdir $(NF_DIR)
	mkdir $(SNF_DIR)
	mkdir $(TCURVE_DIR)
	for prog in $(G0N_PROGS); do $(check_run); done
	rm -rf $(NF_DIR)
	rm -rf $(SNF_DIR)
	rm -rf $(TCURVE_DIR)

#################################################################################

check:
	$(MAKE) check_procs check_qcurves check_qrank check_g0n
	rm -f *.testout PRIMES 1

# When allprogs is disabled the only binary to be built and installed
# is mwrank, but we want "make check" to build and test all.

if ALLPROGS
bin_PROGRAMS=$(PROCS_PROGS) $(QCURVES_PROGS) $(QRANK_PROGS) $(G0N_PROGS)
check_PROGRAMS=
else
bin_PROGRAMS=mwrank$(EXEEXT)
check_PROGRAMS=$(PROCS_PROGS) $(QCURVES_PROGS) $(QRANK_CHECK_PROGS) $(G0N_PROGS)
endif

# We list here the directories in and out which contain the test input
# and expected output files for the tests run by "make check".

EXTRA_DIST = in out_ntl out_no_ntl

ACLOCAL_AMFLAGS = -I m4