comparison makefile.shared @ 190:d8254fc979e9 libtommath-orig LTM_0.35

Initial import of libtommath 0.35
author Matt Johnston <matt@ucc.asn.au>
date Fri, 06 May 2005 08:59:30 +0000
parents d29b64170cf0
children
comparison
equal deleted inserted replaced
142:d29b64170cf0 190:d8254fc979e9
1 #Makefile for GCC 1 #Makefile for GCC
2 # 2 #
3 #Tom St Denis 3 #Tom St Denis
4 VERSION=0:32 4 VERSION=0:35
5 5
6 CC = libtool --mode=compile gcc 6 CC = libtool --mode=compile gcc
7
8 CFLAGS += -I./ -Wall -W -Wshadow -Wsign-compare 7 CFLAGS += -I./ -Wall -W -Wshadow -Wsign-compare
9 8
10 #for speed 9 #for speed
11 CFLAGS += -O3 -funroll-loops 10 CFLAGS += -O3 -funroll-loops
12 11
14 #CFLAGS += -Os 13 #CFLAGS += -Os
15 14
16 #x86 optimizations [should be valid for any GCC install though] 15 #x86 optimizations [should be valid for any GCC install though]
17 CFLAGS += -fomit-frame-pointer 16 CFLAGS += -fomit-frame-pointer
18 17
18 #install as this user
19 USER=root
20 GROUP=root
21
19 default: libtommath.la 22 default: libtommath.la
20 23
21 #default files to install 24 #default files to install
22 LIBNAME=libtommath.la 25 LIBNAME=libtommath.la
23 HEADERS=tommath.h 26 HEADERS=tommath.h tommath_class.h tommath_superclass.h
24 27
25 #LIBPATH-The directory for libtommath to be installed to. 28 #LIBPATH-The directory for libtommath to be installed to.
26 #INCPATH-The directory to install the header files for libtommath. 29 #INCPATH-The directory to install the header files for libtommath.
27 #DATAPATH-The directory to install the pdf docs. 30 #DATAPATH-The directory to install the pdf docs.
28 DESTDIR= 31 DESTDIR=
48 bn_mp_prime_is_divisible.o bn_prime_tab.o bn_mp_prime_fermat.o bn_mp_prime_miller_rabin.o \ 51 bn_mp_prime_is_divisible.o bn_prime_tab.o bn_mp_prime_fermat.o bn_mp_prime_miller_rabin.o \
49 bn_mp_prime_is_prime.o bn_mp_prime_next_prime.o bn_mp_dr_reduce.o \ 52 bn_mp_prime_is_prime.o bn_mp_prime_next_prime.o bn_mp_dr_reduce.o \
50 bn_mp_dr_is_modulus.o bn_mp_dr_setup.o bn_mp_reduce_setup.o \ 53 bn_mp_dr_is_modulus.o bn_mp_dr_setup.o bn_mp_reduce_setup.o \
51 bn_mp_toom_mul.o bn_mp_toom_sqr.o bn_mp_div_3.o bn_s_mp_exptmod.o \ 54 bn_mp_toom_mul.o bn_mp_toom_sqr.o bn_mp_div_3.o bn_s_mp_exptmod.o \
52 bn_mp_reduce_2k.o bn_mp_reduce_is_2k.o bn_mp_reduce_2k_setup.o \ 55 bn_mp_reduce_2k.o bn_mp_reduce_is_2k.o bn_mp_reduce_2k_setup.o \
56 bn_mp_reduce_2k_l.o bn_mp_reduce_is_2k_l.o bn_mp_reduce_2k_setup_l.o \
53 bn_mp_radix_smap.o bn_mp_read_radix.o bn_mp_toradix.o bn_mp_radix_size.o \ 57 bn_mp_radix_smap.o bn_mp_read_radix.o bn_mp_toradix.o bn_mp_radix_size.o \
54 bn_mp_fread.o bn_mp_fwrite.o bn_mp_cnt_lsb.o bn_error.o \ 58 bn_mp_fread.o bn_mp_fwrite.o bn_mp_cnt_lsb.o bn_error.o \
55 bn_mp_init_multi.o bn_mp_clear_multi.o bn_mp_exteuclid.o bn_mp_toradix_n.o \ 59 bn_mp_init_multi.o bn_mp_clear_multi.o bn_mp_exteuclid.o bn_mp_toradix_n.o \
56 bn_mp_prime_random_ex.o bn_mp_get_int.o bn_mp_sqrt.o bn_mp_is_square.o bn_mp_init_set.o \ 60 bn_mp_prime_random_ex.o bn_mp_get_int.o bn_mp_sqrt.o bn_mp_is_square.o bn_mp_init_set.o \
57 bn_mp_init_set_int.o bn_mp_invmod_slow.o bn_mp_prime_rabin_miller_trials.o 61 bn_mp_init_set_int.o bn_mp_invmod_slow.o bn_mp_prime_rabin_miller_trials.o \
62 bn_mp_to_signed_bin_n.o bn_mp_to_unsigned_bin_n.o
63
58 64
59 libtommath.la: $(OBJECTS) 65 libtommath.la: $(OBJECTS)
60 libtool --mode=link gcc *.lo -o libtommath.la -rpath $(LIBPATH) -version-info $(VERSION) 66 libtool --mode=link gcc *.lo -o libtommath.la -rpath $(LIBPATH) -version-info $(VERSION)
61 libtool --mode=link gcc *.o -o libtommath.a 67 libtool --mode=link gcc *.o -o libtommath.a
62 libtool --mode=install install -c libtommath.la $(LIBPATH)/libtommath.la 68 libtool --mode=install install -c libtommath.la $(LIBPATH)/libtommath.la
63 install -d -g root -o root $(DESTDIR)$(INCPATH) 69 install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
64 install -g root -o root $(HEADERS) $(DESTDIR)$(INCPATH) 70 install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH)
65 71
66 test: libtommath.a demo/demo.o 72 test: libtommath.a demo/demo.o
67 gcc $(CFLAGS) -c demo/demo.c -o demo/demo.o 73 gcc $(CFLAGS) -c demo/demo.c -o demo/demo.o
68 libtool --mode=link gcc -o test demo/demo.o libtommath.la 74 libtool --mode=link gcc -o test demo/demo.o libtommath.la
69 75