Build Tom's fast math library on Windows

This commit is contained in:
Asanka Herath
2010-05-26 12:17:30 -04:00
parent 0d17cbefee
commit 85f6e6d670
3 changed files with 176 additions and 1 deletions

View File

@@ -29,12 +29,22 @@
# POSSIBILITY OF SUCH DAMAGE.
#
SUBDIRS=tomsfastmath
RELDIR=lib\hcrypto
AUXCFLAGS=$(AUXCFLAGS) -DKRB5 -I$(HCRYPTOINCLUDEDIR)
!include ../../windows/NTMakefile.w32
# Do dependencies first
all:: subdirs
clean:: clean-subdirs
test:: test-subdirs
# Include files
HCRYPTOINCLUDEDIR=$(INCDIR)\hcrypto
@@ -108,6 +118,7 @@ libhcrypto_OBJs = \
$(OBJ)\rsa.obj \
$(OBJ)\rsa-gmp.obj \
$(OBJ)\rsa-imath.obj \
$(OBJ)\rsa-tfm.obj \
$(OBJ)\sha.obj \
$(OBJ)\sha256.obj \
$(OBJ)\ui.obj
@@ -116,7 +127,7 @@ libhcrypto_OBJs = \
$(LIBHCRYPTO): $(BINDIR)\libhcrypto.dll
$(BINDIR)\libhcrypto.dll: $(libhcrypto_OBJs) $(LIBROKEN) $(LIBASN1)
$(BINDIR)\libhcrypto.dll: $(libhcrypto_OBJs) $(LIBROKEN) $(LIBASN1) $(LIBTFM)
$(DLLGUILINK) -def:libhcrypto-exports.def -implib:$(LIBHCRYPTO)
$(DLLPREP)
@@ -258,3 +269,4 @@ test-run:
cd $(SRCDIR)
test:: $(TESTLIB) test-binaries test-run

View File

@@ -0,0 +1,162 @@
########################################################################
#
# Copyright (c) 2009, Secure Endpoints Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# - Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# - Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
RELDIR=lib\hcrypto\tomsfastmath
!include ../../../windows/NTMakefile.w32
INCFILES=$(INCDIR)\tfm.h
libtfm_OBJs= \
$(OBJ)\fp_add.obj \
$(OBJ)\fp_add_d.obj \
$(OBJ)\fp_addmod.obj \
$(OBJ)\fp_cmp.obj \
$(OBJ)\fp_cmp_d.obj \
$(OBJ)\fp_cmp_mag.obj \
$(OBJ)\fp_sub.obj \
$(OBJ)\fp_sub_d.obj \
$(OBJ)\fp_submod.obj \
$(OBJ)\s_fp_add.obj \
$(OBJ)\s_fp_sub.obj \
$(OBJ)\fp_radix_size.obj \
$(OBJ)\fp_read_radix.obj \
$(OBJ)\fp_read_signed_bin.obj \
$(OBJ)\fp_read_unsigned_bin.obj \
$(OBJ)\fp_reverse.obj \
$(OBJ)\fp_s_rmap.obj \
$(OBJ)\fp_signed_bin_size.obj \
$(OBJ)\fp_to_signed_bin.obj \
$(OBJ)\fp_to_unsigned_bin.obj \
$(OBJ)\fp_toradix.obj \
$(OBJ)\fp_unsigned_bin_size.obj \
$(OBJ)\fp_cnt_lsb.obj \
$(OBJ)\fp_count_bits.obj \
$(OBJ)\fp_div_2.obj \
$(OBJ)\fp_div_2d.obj \
$(OBJ)\fp_lshd.obj \
$(OBJ)\fp_mod_2d.obj \
$(OBJ)\fp_rshd.obj \
$(OBJ)\fp_div.obj \
$(OBJ)\fp_div_d.obj \
$(OBJ)\fp_mod.obj \
$(OBJ)\fp_mod_d.obj \
$(OBJ)\fp_2expt.obj \
$(OBJ)\fp_exptmod.obj \
$(OBJ)\fp_ident.obj \
$(OBJ)\fp_set.obj \
$(OBJ)\fp_montgomery_calc_normalization.obj \
$(OBJ)\fp_montgomery_reduce.obj \
$(OBJ)\fp_montgomery_setup.obj \
$(OBJ)\fp_mul.obj \
$(OBJ)\fp_mul_2.obj \
$(OBJ)\fp_mul_2d.obj \
$(OBJ)\fp_mul_comba.obj \
$(OBJ)\fp_mul_comba_12.obj \
$(OBJ)\fp_mul_comba_17.obj \
$(OBJ)\fp_mul_comba_20.obj \
$(OBJ)\fp_mul_comba_24.obj \
$(OBJ)\fp_mul_comba_28.obj \
$(OBJ)\fp_mul_comba_3.obj \
$(OBJ)\fp_mul_comba_32.obj \
$(OBJ)\fp_mul_comba_4.obj \
$(OBJ)\fp_mul_comba_48.obj \
$(OBJ)\fp_mul_comba_6.obj \
$(OBJ)\fp_mul_comba_64.obj \
$(OBJ)\fp_mul_comba_7.obj \
$(OBJ)\fp_mul_comba_8.obj \
$(OBJ)\fp_mul_comba_9.obj \
$(OBJ)\fp_mul_comba_small_set.obj \
$(OBJ)\fp_mul_d.obj \
$(OBJ)\fp_mulmod.obj \
$(OBJ)\fp_gcd.obj \
$(OBJ)\fp_invmod.obj \
$(OBJ)\fp_isprime.obj \
$(OBJ)\fp_lcm.obj \
$(OBJ)\fp_prime_miller_rabin.obj \
$(OBJ)\fp_prime_random_ex.obj \
$(OBJ)\fp_sqr.obj \
$(OBJ)\fp_sqr_comba.obj \
$(OBJ)\fp_sqr_comba_12.obj \
$(OBJ)\fp_sqr_comba_17.obj \
$(OBJ)\fp_sqr_comba_20.obj \
$(OBJ)\fp_sqr_comba_24.obj \
$(OBJ)\fp_sqr_comba_28.obj \
$(OBJ)\fp_sqr_comba_3.obj \
$(OBJ)\fp_sqr_comba_32.obj \
$(OBJ)\fp_sqr_comba_4.obj \
$(OBJ)\fp_sqr_comba_48.obj \
$(OBJ)\fp_sqr_comba_6.obj \
$(OBJ)\fp_sqr_comba_64.obj \
$(OBJ)\fp_sqr_comba_7.obj \
$(OBJ)\fp_sqr_comba_8.obj \
$(OBJ)\fp_sqr_comba_9.obj \
$(OBJ)\fp_sqr_comba_generic.obj \
$(OBJ)\fp_sqr_comba_small_set.obj \
$(OBJ)\fp_sqrmod.obj
{src\addsub}.c{$(OBJ)}.obj:
$(C2OBJ)
{src\bin}.c{$(OBJ)}.obj:
$(C2OBJ)
{src\bit}.c{$(OBJ)}.obj:
$(C2OBJ)
{src\divide}.c{$(OBJ)}.obj:
$(C2OBJ)
{src\exptmod}.c{$(OBJ)}.obj:
$(C2OBJ)
{src\misc}.c{$(OBJ)}.obj:
$(C2OBJ)
{src\mont}.c{$(OBJ)}.obj:
$(C2OBJ)
{src\mul}.c{$(OBJ)}.obj:
$(C2OBJ)
{src\numtheory}.c{$(OBJ)}.obj:
$(C2OBJ)
{src\sqr}.c{$(OBJ)}.obj:
$(C2OBJ)
{src\headers}.h{$(INCDIR)}.h:
$(CP) $** $@
$(LIBTFM): $(libtfm_OBJs)
$(LIBCON)
all:: $(INCFILES) $(LIBTFM)

View File

@@ -456,3 +456,4 @@ LIBHDB =$(LIBDIR)\libhdb.lib
LIBKADM5SRV =$(LIBDIR)\libkadm5srv.lib
LIBKADM5CLNT=$(LIBDIR)\libkadm5clnt.lib
LIBKDC =$(LIBDIR)\libkdc.lib
LIBTFM =$(LIBDIR)\libtfm.lib