Mercurial > dropbear
annotate libtommath/Makefile.in @ 1605:bff41a61a1b6
Disable wrapfds outside of fuzzed code
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 08 Mar 2018 23:22:53 +0800 |
parents | 47fcbdd12d9b |
children | f52919ffd3b1 |
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 | 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 | 11 ifeq ($V,1) |
12 silent= | |
13 else | |
14 silent=@ | |
392 | 15 endif |
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 | 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 | 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 | 34 #START_INS |
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 \ | |
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 \ | |
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 \ | |
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 \ | |
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 \ | |
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 \ | |
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 \ | |
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 \ | |
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 \ | |
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 \ | |
45 bn_mp_mod.o bn_mp_mod_d.o bn_mp_montgomery_calc_normalization.o bn_mp_montgomery_reduce.o \ | |
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 \ | |
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 \ | |
48 bn_mp_prime_is_prime.o bn_mp_prime_miller_rabin.o bn_mp_prime_next_prime.o \ | |
49 bn_mp_prime_rabin_miller_trials.o bn_mp_prime_random_ex.o bn_mp_radix_size.o bn_mp_radix_smap.o \ | |
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 \ | |
51 bn_mp_reduce_2k_l.o bn_mp_reduce_2k_setup.o bn_mp_reduce_2k_setup_l.o bn_mp_reduce.o \ | |
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 \ | |
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 \ | |
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 \ | |
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 \ | |
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 \ | |
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 \ | |
58 bn_s_mp_sqr.o bn_s_mp_sub.o | |
59 | |
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 | 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 | 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 | 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 | 92 install -d $(DESTDIR)$(LIBPATH) |
93 install -d $(DESTDIR)$(INCPATH) | |
94 install -m 644 $(LIBNAME) $(DESTDIR)$(LIBPATH) | |
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 | 102 $(CC) $(CFLAGS) demo/demo.o $(LIBNAME) $(LFLAGS) -o test |
103 | |
104 test_standalone: $(LIBNAME) demo/demo.o | |
105 $(CC) $(CFLAGS) demo/demo.o $(LIBNAME) $(LFLAGS) -o test | |
106 | |
107 .PHONY: mtest | |
108 mtest: | |
109 cd mtest ; $(CC) $(CFLAGS) -O0 mtest.c $(LFLAGS) -o mtest | |
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 | 116 $(CC) $(CFLAGS) -DTIMER demo/timing.c $(LIBNAME) $(LFLAGS) -o ltmtest |
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 | 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 | 129 .PHONY: pre_gen |
130 pre_gen: | |
131 perl gen.pl | |
132 sed -e 's/[[:blank:]]*$$//' mpi.c > pre_gen/mpi.c | |
133 rm mpi.c | |
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 | 151 |
152 new_file: | |
153 bash updatemakes.sh | |
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 |