File tree Expand file tree Collapse file tree 2 files changed +26
-19
lines changed Expand file tree Collapse file tree 2 files changed +26
-19
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,16 @@ sub patch_file {
221221 return $content ;
222222}
223223
224+ sub make_sources_cmake {
225+ my @list = @_ ;
226+ my $output = " set(SOURCES\n " ;
227+ foreach my $obj (sort @list ) {
228+ $output .= $obj . " \n " ;
229+ }
230+ $output .= " )\n\n set(HEADERS\n tommath.h\n )\n " ;
231+ return $output ;
232+ }
233+
224234sub process_makefiles {
225235 my $write = shift ;
226236 my $changed_count = 0;
@@ -244,10 +254,12 @@ sub process_makefiles {
244254 }
245255
246256 # update OBJECTS + HEADERS in makefile*
247- for my $m (qw/ makefile makefile.shared makefile_include.mk makefile.msvc makefile.unix makefile.mingw / ) {
257+ for my $m (qw/ makefile makefile.shared makefile_include.mk makefile.msvc makefile.unix makefile.mingw sources.cmake / ) {
248258 my $old = read_file($m );
249259 my $new = $m eq ' makefile.msvc' ? patch_file($old , $var_obj )
250- : patch_file($old , $var_o );
260+ : $m eq ' sources.cmake' ? make_sources_cmake(bsd_glob(" *.c" ))
261+ : patch_file($old , $var_o );
262+
251263 if ($old ne $new ) {
252264 write_file($m , $new ) if $write ;
253265 warn " changed: $m \n " ;
Original file line number Diff line number Diff line change @@ -16,18 +16,17 @@ mp_complement.c
1616mp_copy.c
1717mp_count_bits.c
1818mp_cutoffs.c
19+ mp_div.c
1920mp_div_2.c
2021mp_div_2d.c
21- mp_div_3.c
22- mp_div.c
2322mp_div_d.c
2423mp_dr_is_modulus.c
2524mp_dr_reduce.c
2625mp_dr_setup.c
2726mp_error_to_string.c
2827mp_exch.c
28+ mp_expt_n.c
2929mp_exptmod.c
30- mp_expt_u32.c
3130mp_exteuclid.c
3231mp_fread.c
3332mp_from_sbin.c
@@ -38,39 +37,35 @@ mp_get_double.c
3837mp_get_i32.c
3938mp_get_i64.c
4039mp_get_l.c
41- mp_get_ll.c
4240mp_get_mag_u32.c
4341mp_get_mag_u64.c
4442mp_get_mag_ul.c
45- mp_get_mag_ull.c
4643mp_grow.c
4744mp_init.c
4845mp_init_copy.c
4946mp_init_i32.c
5047mp_init_i64.c
5148mp_init_l.c
52- mp_init_ll.c
5349mp_init_multi.c
5450mp_init_set.c
5551mp_init_size.c
5652mp_init_u32.c
5753mp_init_u64.c
5854mp_init_ul.c
59- mp_init_ull.c
6055mp_invmod.c
6156mp_is_square.c
6257mp_kronecker.c
6358mp_lcm.c
64- mp_log_u32 .c
59+ mp_log_n .c
6560mp_lshd.c
66- mp_mod_2d.c
6761mp_mod.c
62+ mp_mod_2d.c
6863mp_montgomery_calc_normalization.c
6964mp_montgomery_reduce.c
7065mp_montgomery_setup.c
66+ mp_mul.c
7167mp_mul_2.c
7268mp_mul_2d.c
73- mp_mul.c
7469mp_mul_d.c
7570mp_mulmod.c
7671mp_neg.c
@@ -86,32 +81,30 @@ mp_prime_rabin_miller_trials.c
8681mp_prime_rand.c
8782mp_prime_strong_lucas_selfridge.c
8883mp_radix_size.c
84+ mp_radix_size_overestimate.c
8985mp_rand.c
9086mp_read_radix.c
87+ mp_reduce.c
9188mp_reduce_2k.c
9289mp_reduce_2k_l.c
9390mp_reduce_2k_setup.c
9491mp_reduce_2k_setup_l.c
95- mp_reduce.c
9692mp_reduce_is_2k.c
9793mp_reduce_is_2k_l.c
9894mp_reduce_setup.c
99- mp_root_u32 .c
95+ mp_root_n .c
10096mp_rshd.c
10197mp_sbin_size.c
10298mp_set.c
10399mp_set_double.c
104100mp_set_i32.c
105101mp_set_i64.c
106102mp_set_l.c
107- mp_set_ll.c
108103mp_set_u32.c
109104mp_set_u64.c
110105mp_set_ul.c
111- mp_set_ull.c
112106mp_shrink.c
113107mp_signed_rsh.c
114- mp_sqr.c
115108mp_sqrmod.c
116109mp_sqrt.c
117110mp_sqrtmod_prime.c
@@ -127,6 +120,7 @@ mp_xor.c
127120mp_zero.c
128121s_mp_add.c
129122s_mp_copy_digs.c
123+ s_mp_div_3.c
130124s_mp_div_recursive.c
131125s_mp_div_school.c
132126s_mp_div_small.c
@@ -136,11 +130,11 @@ s_mp_get_bit.c
136130s_mp_invmod.c
137131s_mp_invmod_odd.c
138132s_mp_log.c
133+ s_mp_log_2expt.c
139134s_mp_log_d.c
140- s_mp_log_pow2.c
141135s_mp_montgomery_reduce_comba.c
142- s_mp_mul_balance.c
143136s_mp_mul.c
137+ s_mp_mul_balance.c
144138s_mp_mul_comba.c
145139s_mp_mul_high.c
146140s_mp_mul_high_comba.c
@@ -149,6 +143,7 @@ s_mp_mul_toom.c
149143s_mp_prime_is_divisible.c
150144s_mp_prime_tab.c
151145s_mp_radix_map.c
146+ s_mp_radix_size_overestimate.c
152147s_mp_rand_jenkins.c
153148s_mp_rand_platform.c
154149s_mp_sqr.c
You can’t perform that action at this time.
0 commit comments