comparison tomsfastmath/Makefile.in @ 644:ff5cc422ba40 dropbear-tfm tomsfastmath

Somehow Makefile.in went missing
author Matt Johnston <matt@ucc.asn.au>
date Wed, 23 Nov 2011 18:11:51 +0700
parents
children
comparison
equal deleted inserted replaced
643:a362b62d38b2 644:ff5cc422ba40
1 #makefile for TomsFastMath
2 #
3 #
4 VERSION=0.12
5
6 VPATH=@srcdir@
7 srcdir=@srcdir@
8
9 # Dropbear takes flags from the toplevel makefile
10 CFLAGS += -I$(srcdir)
11
12 CFLAGS += -I$(srcdir)/src/headers/ -I$(srcdir)/../
13
14 ifndef MAKE
15 MAKE=make
16 endif
17
18 ifndef IGNORE_SPEED
19
20 CFLAGS += -O3 -funroll-loops
21
22 #profiling
23 #PROF=-pg -g
24 #CFLAGS += $(PROF)
25
26 #speed
27 CFLAGS += -fomit-frame-pointer
28
29 endif
30
31 #START_INS
32 OBJECTS=src/addsub/fp_add.o src/addsub/fp_add_d.o src/addsub/fp_addmod.o src/addsub/fp_cmp.o \
33 src/addsub/fp_cmp_d.o src/addsub/fp_cmp_mag.o src/addsub/fp_sub.o src/addsub/fp_sub_d.o \
34 src/addsub/fp_submod.o src/addsub/s_fp_add.o src/addsub/s_fp_sub.o src/bin/fp_radix_size.o \
35 src/bin/fp_read_radix.o src/bin/fp_read_signed_bin.o src/bin/fp_read_unsigned_bin.o \
36 src/bin/fp_reverse.o src/bin/fp_s_rmap.o src/bin/fp_signed_bin_size.o src/bin/fp_to_signed_bin.o \
37 src/bin/fp_to_unsigned_bin.o src/bin/fp_toradix.o src/bin/fp_unsigned_bin_size.o src/bit/fp_cnt_lsb.o \
38 src/bit/fp_count_bits.o src/bit/fp_div_2.o src/bit/fp_div_2d.o src/bit/fp_lshd.o src/bit/fp_mod_2d.o \
39 src/bit/fp_rshd.o src/divide/fp_div.o src/divide/fp_div_d.o src/divide/fp_mod.o src/divide/fp_mod_d.o \
40 src/exptmod/fp_2expt.o src/exptmod/fp_exptmod.o src/misc/fp_ident.o src/misc/fp_set.o \
41 src/mont/fp_montgomery_calc_normalization.o src/mont/fp_montgomery_reduce.o \
42 src/mont/fp_montgomery_setup.o src/mul/fp_mul.o src/mul/fp_mul_2.o src/mul/fp_mul_2d.o \
43 src/mul/fp_mul_comba.o src/mul/fp_mul_comba_12.o src/mul/fp_mul_comba_17.o src/mul/fp_mul_comba_20.o \
44 src/mul/fp_mul_comba_24.o src/mul/fp_mul_comba_28.o src/mul/fp_mul_comba_3.o src/mul/fp_mul_comba_32.o \
45 src/mul/fp_mul_comba_4.o src/mul/fp_mul_comba_48.o src/mul/fp_mul_comba_6.o src/mul/fp_mul_comba_64.o \
46 src/mul/fp_mul_comba_7.o src/mul/fp_mul_comba_8.o src/mul/fp_mul_comba_9.o \
47 src/mul/fp_mul_comba_small_set.o src/mul/fp_mul_d.o src/mul/fp_mulmod.o src/numtheory/fp_gcd.o \
48 src/numtheory/fp_invmod.o src/numtheory/fp_isprime.o src/numtheory/fp_lcm.o \
49 src/numtheory/fp_prime_miller_rabin.o src/numtheory/fp_prime_random_ex.o src/sqr/fp_sqr.o \
50 src/sqr/fp_sqr_comba.o src/sqr/fp_sqr_comba_12.o src/sqr/fp_sqr_comba_17.o src/sqr/fp_sqr_comba_20.o \
51 src/sqr/fp_sqr_comba_24.o src/sqr/fp_sqr_comba_28.o src/sqr/fp_sqr_comba_3.o src/sqr/fp_sqr_comba_32.o \
52 src/sqr/fp_sqr_comba_4.o src/sqr/fp_sqr_comba_48.o src/sqr/fp_sqr_comba_6.o src/sqr/fp_sqr_comba_64.o \
53 src/sqr/fp_sqr_comba_7.o src/sqr/fp_sqr_comba_8.o src/sqr/fp_sqr_comba_9.o \
54 src/sqr/fp_sqr_comba_generic.o src/sqr/fp_sqr_comba_small_set.o src/sqr/fp_sqrmod.o
55
56 HEADERS=src/headers/tfm.h
57
58 #END_INS
59
60 ifndef LIBPATH
61 LIBPATH=/usr/lib
62 endif
63
64 ifndef INCPATH
65 INCPATH=/usr/include
66 endif
67
68 ifndef INSTALL_GROUP
69 GROUP=wheel
70 else
71 GROUP=$(INSTALL_GROUP)
72 endif
73
74 ifndef INSTALL_USER
75 USER=root
76 else
77 USER=$(INSTALL_USER)
78 endif
79
80 ifndef LIBNAME
81 LIBNAME=libtfm.a
82 endif
83
84 default: $(LIBNAME)
85
86 $(LIBNAME): $(OBJECTS)
87 $(AR) $(ARFLAGS) $@ $(OBJECTS)
88 ranlib $@
89
90 install: $(LIBNAME)
91 install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)
92 install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
93 install -g $(GROUP) -o $(USER) $(LIBNAME) $(DESTDIR)$(LIBPATH)
94 install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH)
95
96 mtest/mtest: mtest/mtest.o
97 cd mtest ; CFLAGS="$(CFLAGS) -I../" MAKE=${MAKE} ${MAKE} mtest
98
99 test: $(LIBNAME) demo/test.o mtest/mtest
100 $(CC) $(CFLAGS) demo/test.o $(LIBNAME) $(PROF) -o test
101
102 timing: $(LIBNAME) demo/test.o
103 $(CC) $(CFLAGS) demo/test.o $(LIBNAME) $(PROF) -o test
104
105 profiled:
106 CFLAGS="${CFLAGS} -fprofile-generate" MAKE=${MAKE} ${MAKE} timing
107 ./test
108 rm -f `find . -type f | grep "[.]o" | xargs`
109 rm -f `find . -type f | grep "[.]a" | xargs`
110 rm -f test
111 CFLAGS="${CFLAGS} -fprofile-use" MAKE=${MAKE} ${MAKE} timing
112
113 stest: $(LIBNAME) demo/stest.o
114 $(CC) $(CFLAGS) demo/stest.o $(LIBNAME) -o stest
115
116 rsatest: $(LIBNAME) demo/rsa.o
117 $(CC) $(CFLAGS) demo/rsa.o $(LIBNAME) -o rsatest
118
119 docdvi: tfm.tex
120 touch tfm.ind
121 latex tfm >/dev/null
122 latex tfm >/dev/null
123 makeindex tfm
124 latex tfm >/dev/null
125
126 docs: docdvi
127 latex tfm >/dev/null
128 dvipdf tfm
129 mv -f tfm.pdf doc
130
131 #This rule cleans the source tree of all compiled code, not including the pdf
132 #documentation.
133 clean:
134 rm -f `find . -type f | grep "[.]o" | xargs`
135 rm -f `find . -type f | grep "[.]lo" | xargs`
136 rm -f `find . -type f | grep "[.]a" | xargs`
137 rm -f `find . -type f | grep "[.]la" | xargs`
138 rm -f `find . -type f | grep "[.]obj" | xargs`
139 rm -f `find . -type f | grep "[.]lib" | xargs`
140 rm -f `find . -type f | grep "[.]exe" | xargs`
141 rm -f `find . -type f | grep "[.]gcda" | xargs`
142 rm -f `find . -type f | grep "[.]gcno" | xargs`
143 rm -f `find . -type f | grep "[.]il" | xargs`
144 rm -f `find . -type f | grep "[.]dyn" | xargs`
145 rm -f `find . -type f | grep "[.]dpi" | xargs`
146 rm -rf `find . -type d | grep "[.]libs" | xargs`
147 rm -f tfm.aux tfm.dvi tfm.idx tfm.ilg tfm.ind tfm.lof tfm.log tfm.toc test mtest/mtest
148 cd mtest ; MAKE=${MAKE} ${MAKE} clean
149
150 no_oops: clean
151 cd .. ; cvs commit
152 echo Scanning for scratch/dirty files
153 find . -type f | grep -v CVS | xargs -n 1 bash mess.sh
154
155 zipup: no_oops docs clean
156 perl gen.pl ; mv mpi.c pre_gen/ ; \
157 cd .. ; rm -rf tfm* tomsfastmath-$(VERSION) ; mkdir tomsfastmath-$(VERSION) ; \
158 cp -R ./tomsfastmath/* ./tomsfastmath-$(VERSION)/ ; \
159 tar -c tomsfastmath-$(VERSION)/* | bzip2 -9vvc > tfm-$(VERSION).tar.bz2 ; \
160 zip -9r tfm-$(VERSION).zip tomsfastmath-$(VERSION)/* ; \
161 mv -f tfm* ~ ; rm -rf tomsfastmath-$(VERSION)
162
163 # $Source: /cvs/libtom/tomsfastmath/makefile,v $
164 # $Revision: 1.38 $
165 # $Date: 2007/03/13 01:23:03 $