annotate libtommath/Makefile.in @ 1608:97335566a3bb

move dictionaries to corpus repo
author Matt Johnston <matt@ucc.asn.au>
date Fri, 09 Mar 2018 20:43:11 +0800
parents 47fcbdd12d9b
children f52919ffd3b1
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=@srcdir@
ef310db5ccec fix updates to libtomcrypt/libtommath for out of tree builds
Matt Johnston <matt@ucc.asn.au>
parents: 1436
diff changeset
6 srcdir=@srcdir@
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
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
17 #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
18 ifndef LIBNAME
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
19 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
20 endif
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
21
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
22 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
23
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
24 include $(srcdir)/makefile_include.mk
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
25
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
26 %.o: %.c
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
27 ifneq ($V,1)
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
28 @echo " * ${CC} $@"
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
29 endif
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
30 ${silent} ${CC} -c ${CFLAGS} $< -o $@
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
31
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
32 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
33
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
34 #START_INS
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
35 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
36 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
37 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
38 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
39 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
40 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
41 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
42 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
43 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
44 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
45 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
46 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
47 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
48 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
49 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
50 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
51 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
52 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
53 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
54 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
55 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
56 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
57 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
58 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
59
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
60 #END_INS
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
61
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
62 $(OBJECTS): $(HEADERS)
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
63
389
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
64 $(LIBNAME): $(OBJECTS)
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
65 $(AR) $(ARFLAGS) $@ $(OBJECTS)
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
66 $(RANLIB) $@
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
67
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
68 #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
69 #
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
70 # 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
71 # 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
72 #
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
73 # 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
74 profiled:
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
75 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
76 ./ltmtest
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
77 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
78 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
79
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
80 #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
81 profiled_single:
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
82 perl gen.pl
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
83 $(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
84 $(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
85 ./ltmtest
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
86 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
87 $(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
88 $(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
89 $(RANLIB) $(LIBNAME)
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
90
389
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
91 install: $(LIBNAME)
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
92 install -d $(DESTDIR)$(LIBPATH)
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
93 install -d $(DESTDIR)$(INCPATH)
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
94 install -m 644 $(LIBNAME) $(DESTDIR)$(LIBPATH)
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
95 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
96
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
97 uninstall:
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
98 rm $(DESTDIR)$(LIBPATH)/$(LIBNAME)
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
99 rm $(HEADERS_PUB:%=$(DESTDIR)$(INCPATH)/%)
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
100
389
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
101 test: $(LIBNAME) demo/demo.o
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
102 $(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
103
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
104 test_standalone: $(LIBNAME) demo/demo.o
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
105 $(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
106
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
107 .PHONY: mtest
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
108 mtest:
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
109 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
110
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
111 travis_mtest: test mtest
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
112 @ for i in `seq 1 10` ; do sleep 500 && echo alive; done &
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
113 ./mtest/mtest 666666 | ./test > test.log
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
114
389
5ff8218bcee9 propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 2af95f00ebd5bb7a28b3817db1218442c935388e)
Matt Johnston <matt@ucc.asn.au>
parents: 284
diff changeset
115 timing: $(LIBNAME)
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
116 $(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
117
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
118 # You have to create a file .coveralls.yml with the content "repo_token: <the token>"
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
119 # in the base folder to be able to submit to coveralls
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
120 coveralls: lcov
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
121 coveralls-lcov
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
122
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
123 docdvi poster docs mandvi manual:
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
124 $(MAKE) -C doc/ $@ V=$(V)
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
125
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
126 pretty:
284
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
127 perl pretty.build
eed26cff980b propagate from branch 'au.asn.ucc.matt.ltm.dropbear' (head 6c790cad5a7fa866ad062cb3a0c279f7ba788583)
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
128
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
129 .PHONY: pre_gen
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
130 pre_gen:
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
131 perl gen.pl
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
132 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
133 rm mpi.c
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
134
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
135 zipup: clean pre_gen new_file manual poster docs
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
136 @# Update the index, so diff-index won't fail in case the pdf has been created.
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
137 @# As the pdf creation modifies the tex files, git sometimes detects the
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
138 @# modified files, but misses that it's put back to its original version.
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
139 @git update-index --refresh
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
140 @git diff-index --quiet HEAD -- || ( echo "FAILURE: uncommited changes or not a git" && exit 1 )
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
141 rm -rf libtommath-$(VERSION) ltm-$(VERSION).*
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
142 @# files/dirs excluded from "git archive" are defined in .gitattributes
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
143 git archive --format=tar --prefix=libtommath-$(VERSION)/ HEAD | tar x
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
144 mkdir -p libtommath-$(VERSION)/doc
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
145 cp doc/bn.pdf doc/tommath.pdf doc/poster.pdf libtommath-$(VERSION)/doc/
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
146 tar -c libtommath-$(VERSION)/ | xz -6e -c - > ltm-$(VERSION).tar.xz
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
147 zip -9rq ltm-$(VERSION).zip libtommath-$(VERSION)
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
148 rm -rf libtommath-$(VERSION)
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
149 gpg -b -a ltm-$(VERSION).tar.xz
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
150 gpg -b -a ltm-$(VERSION).zip
1436
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
151
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
152 new_file:
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
153 bash updatemakes.sh
60fc6476e044 Update to libtommath v1.0
Matt Johnston <matt@ucc.asn.au>
parents: 1299
diff changeset
154 perl dep.pl
1470
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
155
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
156 perlcritic:
8bba51a55704 Update to libtommath v1.0.1
Matt Johnston <matt@ucc.asn.au>
parents: 1454
diff changeset
157 perlcritic *.pl