annotate libtommath/Makefile.in @ 1465:f7a53832501d

cli_bind_address_connect * replaces -b dummy option in dbclient to be similar with openssh -b option * useful in multi-wan connections
author houseofkodai <karthik@houseofkodai.in>
date Mon, 01 May 2017 08:26:15 +0530
parents ef310db5ccec
children 8bba51a55704
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
1 #Makefile for GCC
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
2 #
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
3 #Tom St Denis
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
4
1454
ef310db5ccec fix updates to libtomcrypt/libtommath for out of tree builds
Matt Johnston <matt@ucc.asn.au>
parents: 1436
diff changeset
5 VPATH=@[email protected]
ef310db5ccec fix updates to libtomcrypt/libtommath for out of tree builds
Matt Johnston <matt@ucc.asn.au>
parents: 1436
diff changeset
6 srcdir=@[email protected]
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
7
1282
a3bb15115816 Fix missing paths from m_burn commit
Matt Johnston <matt@ucc.asn.au>
parents: 665
diff changeset
8 # So that libtommath can include Dropbear headers for options and m_burn()
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
9 CFLAGS += -I$(srcdir) -I../libtomcrypt/src/headers/ -I$(srcdir)/../libtomcrypt/src/headers/ -I../ -I$(srcdir)/../
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
10
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
11 ifeq ($V,1)
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
12 silent=
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
13 else
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
14 silent=@
392
24b425be5718 fix missing endif
Matt Johnston <matt@ucc.asn.au>
parents: 389
diff changeset
15 endif
24b425be5718 fix missing endif
Matt Johnston <matt@ucc.asn.au>
parents: 389
diff changeset
16
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
17 %.o: %.c
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
18 ifneq ($V,1)
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
19 @echo " * ${CC} [email protected]"
389
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
20 endif
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
21 ${silent} ${CC} -c ${CFLAGS} $^ -o [email protected]
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
22
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
23 #default files to install
389
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
24 ifndef LIBNAME
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
25 LIBNAME=libtommath.a
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
26 endif
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
27
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
28 coverage: LIBNAME:=-Wl,--whole-archive $(LIBNAME) -Wl,--no-whole-archive
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
29
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
30 LCOV_ARGS=--directory .
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
31
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
32 #START_INS
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
33 OBJECTS=bncore.o bn_error.o bn_fast_mp_invmod.o bn_fast_mp_montgomery_reduce.o bn_fast_s_mp_mul_digs.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
34 bn_fast_s_mp_mul_high_digs.o bn_fast_s_mp_sqr.o bn_mp_2expt.o bn_mp_abs.o bn_mp_add.o bn_mp_add_d.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
35 bn_mp_addmod.o bn_mp_and.o bn_mp_clamp.o bn_mp_clear.o bn_mp_clear_multi.o bn_mp_cmp.o bn_mp_cmp_d.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
36 bn_mp_cmp_mag.o bn_mp_cnt_lsb.o bn_mp_copy.o bn_mp_count_bits.o bn_mp_div_2.o bn_mp_div_2d.o bn_mp_div_3.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
37 bn_mp_div.o bn_mp_div_d.o bn_mp_dr_is_modulus.o bn_mp_dr_reduce.o bn_mp_dr_setup.o bn_mp_exch.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
38 bn_mp_export.o bn_mp_expt_d.o bn_mp_expt_d_ex.o bn_mp_exptmod.o bn_mp_exptmod_fast.o bn_mp_exteuclid.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
39 bn_mp_fread.o bn_mp_fwrite.o bn_mp_gcd.o bn_mp_get_int.o bn_mp_get_long.o bn_mp_get_long_long.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
40 bn_mp_grow.o bn_mp_import.o bn_mp_init.o bn_mp_init_copy.o bn_mp_init_multi.o bn_mp_init_set.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
41 bn_mp_init_set_int.o bn_mp_init_size.o bn_mp_invmod.o bn_mp_invmod_slow.o bn_mp_is_square.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
42 bn_mp_jacobi.o bn_mp_karatsuba_mul.o bn_mp_karatsuba_sqr.o bn_mp_lcm.o bn_mp_lshd.o bn_mp_mod_2d.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
43 bn_mp_mod.o bn_mp_mod_d.o bn_mp_montgomery_calc_normalization.o bn_mp_montgomery_reduce.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
44 bn_mp_montgomery_setup.o bn_mp_mul_2.o bn_mp_mul_2d.o bn_mp_mul.o bn_mp_mul_d.o bn_mp_mulmod.o bn_mp_neg.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
45 bn_mp_n_root.o bn_mp_n_root_ex.o bn_mp_or.o bn_mp_prime_fermat.o bn_mp_prime_is_divisible.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
46 bn_mp_prime_is_prime.o bn_mp_prime_miller_rabin.o bn_mp_prime_next_prime.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
47 bn_mp_prime_rabin_miller_trials.o bn_mp_prime_random_ex.o bn_mp_radix_size.o bn_mp_radix_smap.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
48 bn_mp_rand.o bn_mp_read_radix.o bn_mp_read_signed_bin.o bn_mp_read_unsigned_bin.o bn_mp_reduce_2k.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
49 bn_mp_reduce_2k_l.o bn_mp_reduce_2k_setup.o bn_mp_reduce_2k_setup_l.o bn_mp_reduce.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
50 bn_mp_reduce_is_2k.o bn_mp_reduce_is_2k_l.o bn_mp_reduce_setup.o bn_mp_rshd.o bn_mp_set.o bn_mp_set_int.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
51 bn_mp_set_long.o bn_mp_set_long_long.o bn_mp_shrink.o bn_mp_signed_bin_size.o bn_mp_sqr.o bn_mp_sqrmod.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
52 bn_mp_sqrt.o bn_mp_sqrtmod_prime.o bn_mp_sub.o bn_mp_sub_d.o bn_mp_submod.o bn_mp_toom_mul.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
53 bn_mp_toom_sqr.o bn_mp_toradix.o bn_mp_toradix_n.o bn_mp_to_signed_bin.o bn_mp_to_signed_bin_n.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
54 bn_mp_to_unsigned_bin.o bn_mp_to_unsigned_bin_n.o bn_mp_unsigned_bin_size.o bn_mp_xor.o bn_mp_zero.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
55 bn_prime_tab.o bn_reverse.o bn_s_mp_add.o bn_s_mp_exptmod.o bn_s_mp_mul_digs.o bn_s_mp_mul_high_digs.o \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
56 bn_s_mp_sqr.o bn_s_mp_sub.o
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
57
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
58 #END_INS
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
59
389
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
60 $(LIBNAME): $(OBJECTS)
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
61 $(AR) $(ARFLAGS) [email protected] $(OBJECTS)
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
62 $(RANLIB) [email protected]
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
63
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
64 #make a profiled library (takes a while!!!)
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
65 #
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
66 # This will build the library with profile generation
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
67 # then run the test demo and rebuild the library.
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
68 #
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
69 # So far I've seen improvements in the MP math
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
70 profiled:
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
71 make CFLAGS="$(CFLAGS) -fprofile-arcs -DTESTING" timing
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
72 ./ltmtest
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
73 rm -f *.a *.o ltmtest
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
74 make CFLAGS="$(CFLAGS) -fbranch-probabilities"
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
75
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
76 #make a single object profiled library
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
77 profiled_single:
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
78 perl gen.pl
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
79 $(CC) $(CFLAGS) -fprofile-arcs -DTESTING -c mpi.c -o mpi.o
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
80 $(CC) $(CFLAGS) -DTESTING -DTIMER demo/timing.c mpi.o -lgcov -o ltmtest
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
81 ./ltmtest
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
82 rm -f *.o ltmtest
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
83 $(CC) $(CFLAGS) -fbranch-probabilities -DTESTING -c mpi.c -o mpi.o
389
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
84 $(AR) $(ARFLAGS) $(LIBNAME) mpi.o
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
85 $(RANLIB) $(LIBNAME)
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
86
389
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
87 install: $(LIBNAME)
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
88 install -d $(DESTDIR)$(LIBPATH)
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
89 install -d $(DESTDIR)$(INCPATH)
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
90 install -m 644 $(LIBNAME) $(DESTDIR)$(LIBPATH)
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
91 install -m 644 $(HEADERS_PUB) $(DESTDIR)$(INCPATH)
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
92
389
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
93 test: $(LIBNAME) demo/demo.o
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
94 $(CC) $(CFLAGS) demo/demo.o $(LIBNAME) $(LFLAGS) -o test
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
95
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
96 test_standalone: $(LIBNAME) demo/demo.o
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
97 $(CC) $(CFLAGS) demo/demo.o $(LIBNAME) $(LFLAGS) -o test
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
98
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
99 .PHONY: mtest
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
100 mtest:
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
101 cd mtest ; $(CC) $(CFLAGS) -O0 mtest.c $(LFLAGS) -o mtest
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
102
389
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
103 timing: $(LIBNAME)
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
104 $(CC) $(CFLAGS) -DTIMER demo/timing.c $(LIBNAME) $(LFLAGS) -o ltmtest
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
105
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
106 coveralls: coverage
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
107 cpp-coveralls
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
108
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
109 # makes the LTM book DVI file, requires tetex, perl and makeindex [part of tetex I think]
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
110 docdvi: tommath.src
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
111 cd pics ; MAKE=${MAKE} ${MAKE}
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
112 echo "hello" > tommath.ind
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
113 perl booker.pl
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
114 latex tommath > /dev/null
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
115 latex tommath > /dev/null
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
116 makeindex tommath
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
117 latex tommath > /dev/null
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
118
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
119 # poster, makes the single page PDF poster
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
120 poster: poster.tex
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
121 cp poster.tex poster.bak
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
122 touch --reference=poster.tex poster.bak
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
123 (printf "%s" "\def\fixedpdfdate{"; date +'D:%Y%m%d%H%M%S%:z' -d @$$(stat --format=%Y poster.tex) | sed "s/:\([0-9][0-9]\)$$/'\1'}/g") > poster-deterministic.tex
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
124 printf "%s\n" "\pdfinfo{" >> poster-deterministic.tex
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
125 printf "%s\n" " /CreationDate (\fixedpdfdate)" >> poster-deterministic.tex
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
126 printf "%s\n}\n" " /ModDate (\fixedpdfdate)" >> poster-deterministic.tex
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
127 cat poster.tex >> poster-deterministic.tex
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
128 mv poster-deterministic.tex poster.tex
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
129 touch --reference=poster.bak poster.tex
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
130 pdflatex poster
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
131 sed -b -i 's,^/ID \[.*\]$$,/ID [<0> <0>],g' poster.pdf
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
132 mv poster.bak poster.tex
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
133 rm -f poster.aux poster.log poster.out
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
134
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
135 # makes the LTM book PDF file, requires tetex, cleans up the LaTeX temp files
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
136 docs: docdvi
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
137 dvipdf tommath
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
138 rm -f tommath.log tommath.aux tommath.dvi tommath.idx tommath.toc tommath.lof tommath.ind tommath.ilg
389
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
139 cd pics ; MAKE=${MAKE} ${MAKE} clean
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
140
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
141 #LTM user manual
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
142 mandvi: bn.tex
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
143 cp bn.tex bn.bak
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
144 touch --reference=bn.tex bn.bak
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
145 (printf "%s" "\def\fixedpdfdate{"; date +'D:%Y%m%d%H%M%S%:z' -d @$$(stat --format=%Y bn.tex) | sed "s/:\([0-9][0-9]\)$$/'\1'}/g") > bn-deterministic.tex
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
146 printf "%s\n" "\pdfinfo{" >> bn-deterministic.tex
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
147 printf "%s\n" " /CreationDate (\fixedpdfdate)" >> bn-deterministic.tex
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
148 printf "%s\n}\n" " /ModDate (\fixedpdfdate)" >> bn-deterministic.tex
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
149 cat bn.tex >> bn-deterministic.tex
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
150 mv bn-deterministic.tex bn.tex
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
151 touch --reference=bn.bak bn.tex
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
152 echo "hello" > bn.ind
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
153 latex bn > /dev/null
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
154 latex bn > /dev/null
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
155 makeindex bn
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
156 latex bn > /dev/null
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
157
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
158 #LTM user manual [pdf]
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
159 manual: mandvi
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
160 pdflatex bn >/dev/null
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
161 sed -b -i 's,^/ID \[.*\]$$,/ID [<0> <0>],g' bn.pdf
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
162 mv bn.bak bn.tex
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
163 rm -f bn.aux bn.dvi bn.log bn.idx bn.lof bn.out bn.toc
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
164
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
165 pretty:
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
166 perl pretty.build
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
167
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
168 clean:
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
169 rm -f *.bat *.pdf *.o *.a *.obj *.lib *.exe *.dll etclib/*.o demo/demo.o test ltmtest mpitest mtest/mtest mtest/mtest.exe \
389
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
170 *.idx *.toc *.log *.aux *.dvi *.lof *.ind *.ilg *.ps *.log *.s mpi.c *.da *.dyn *.dpi tommath.tex `find . -type f | grep [~] | xargs` *.lo *.la
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
171 rm -rf .libs
665
4d9511f98462 fix out-of-tree cleaning
Mike Frysinger <vapier@gentoo.org>
parents: 392
diff changeset
172 -cd etc && MAKE=${MAKE} ${MAKE} clean
4d9511f98462 fix out-of-tree cleaning
Mike Frysinger <vapier@gentoo.org>
parents: 392
diff changeset
173 -cd pics && MAKE=${MAKE} ${MAKE} clean
389
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
174
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
175 #\zipup the project (take that!)
389
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
176 no_oops: clean
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
177 cd .. ; cvs commit
389
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
178 echo Scanning for scratch/dirty files
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
179 find . -type f | grep -v CVS | xargs -n 1 bash mess.sh
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
180
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
181 .PHONY: pre_gen
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
182 pre_gen:
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
183 perl gen.pl
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
184 sed -e 's/[[:blank:]]*$$//' mpi.c > pre_gen/mpi.c
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
185 rm mpi.c
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
186
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
187 zipup:
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
188 rm -rf ../libtommath-$(VERSION) \
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
189 && rm -f ../ltm-$(VERSION).zip ../ltm-$(VERSION).zip.asc ../ltm-$(VERSION).tar.xz ../ltm-$(VERSION).tar.xz.asc
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
190 git archive HEAD --prefix=libtommath-$(VERSION)/ > ../libtommath-$(VERSION).tar
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
191 cd .. ; tar xf libtommath-$(VERSION).tar
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
192 MAKE=${MAKE} ${MAKE} -C ../libtommath-$(VERSION) clean manual poster docs
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
193 tar -c ../libtommath-$(VERSION)/* | xz -9 > ../ltm-$(VERSION).tar.xz
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
194 find ../libtommath-$(VERSION)/ -type f -exec unix2dos -q {} \;
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
195 cd .. ; zip -9r ltm-$(VERSION).zip libtommath-$(VERSION)
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
196 gpg -b -a ../ltm-$(VERSION).tar.xz && gpg -b -a ../ltm-$(VERSION).zip
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
197
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
198 new_file:
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
199 bash updatemakes.sh
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
200 perl dep.pl