Mercurial > dropbear
comparison libtommath/Makefile.in @ 511:582cb38e4eb5 insecure-nocrypto
propagate from branch 'au.asn.ucc.matt.dropbear' (head cdcc3c729e29544e8b98a408e2dc60e4483dfd2a)
to branch 'au.asn.ucc.matt.dropbear.insecure-nocrypto' (head 0ca38a1cf349f7426ac9de34ebe4c3e3735effab)
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 06 Nov 2008 13:16:55 +0000 |
parents | 24b425be5718 |
children | 4d9511f98462 |
comparison
equal
deleted
inserted
replaced
361:461c4b1fb35f | 511:582cb38e4eb5 |
---|---|
1 #Makefile for GCC | 1 #Makefile for GCC |
2 # | 2 # |
3 #Tom St Denis | 3 #Tom St Denis |
4 | 4 |
5 #version of library | 5 #version of library |
6 VERSION=0.35 | 6 VERSION=0.40 |
7 | 7 |
8 VPATH=@srcdir@ | 8 VPATH=@srcdir@ |
9 srcdir=@srcdir@ | 9 srcdir=@srcdir@ |
10 | 10 |
11 # Dropbear takes flags from the toplevel makefile | 11 # Dropbear takes flags from the toplevel makefile |
12 CFLAGS += -I$(srcdir) | 12 CFLAGS += -I$(srcdir) |
13 | 13 |
14 #CFLAGS += -I./ -Wall -W -Wshadow -Wsign-compare | 14 #CFLAGS += -I./ -Wall -W -Wshadow -Wsign-compare |
15 | |
16 ifndef IGNORE_SPEED | |
15 | 17 |
16 #for speed | 18 #for speed |
17 #CFLAGS += -O3 -funroll-all-loops | 19 #CFLAGS += -O3 -funroll-all-loops |
18 | 20 |
19 #for size | 21 #for size |
23 #CFLAGS += -fomit-frame-pointer | 25 #CFLAGS += -fomit-frame-pointer |
24 | 26 |
25 #debug | 27 #debug |
26 #CFLAGS += -g3 | 28 #CFLAGS += -g3 |
27 | 29 |
30 endif | |
31 | |
28 #install as this user | 32 #install as this user |
29 USER=root | 33 ifndef INSTALL_GROUP |
30 GROUP=root | 34 GROUP=wheel |
35 else | |
36 GROUP=$(INSTALL_GROUP) | |
37 endif | |
31 | 38 |
32 default: libtommath.a | 39 ifndef INSTALL_USER |
40 USER=root | |
41 else | |
42 USER=$(INSTALL_USER) | |
43 endif | |
33 | 44 |
34 #default files to install | 45 #default files to install |
35 LIBNAME=libtommath.a | 46 ifndef LIBNAME |
47 LIBNAME=libtommath.a | |
48 endif | |
49 | |
50 default: ${LIBNAME} | |
51 | |
36 HEADERS=tommath.h tommath_class.h tommath_superclass.h | 52 HEADERS=tommath.h tommath_class.h tommath_superclass.h |
37 | 53 |
38 #LIBPATH-The directory for libtommath to be installed to. | 54 #LIBPATH-The directory for libtommath to be installed to. |
39 #INCPATH-The directory to install the header files for libtommath. | 55 #INCPATH-The directory to install the header files for libtommath. |
40 #DATAPATH-The directory to install the pdf docs. | 56 #DATAPATH-The directory to install the pdf docs. |
69 bn_mp_init_multi.o bn_mp_clear_multi.o bn_mp_exteuclid.o bn_mp_toradix_n.o \ | 85 bn_mp_init_multi.o bn_mp_clear_multi.o bn_mp_exteuclid.o bn_mp_toradix_n.o \ |
70 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 \ | 86 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 \ |
71 bn_mp_init_set_int.o bn_mp_invmod_slow.o bn_mp_prime_rabin_miller_trials.o \ | 87 bn_mp_init_set_int.o bn_mp_invmod_slow.o bn_mp_prime_rabin_miller_trials.o \ |
72 bn_mp_to_signed_bin_n.o bn_mp_to_unsigned_bin_n.o | 88 bn_mp_to_signed_bin_n.o bn_mp_to_unsigned_bin_n.o |
73 | 89 |
74 libtommath.a: $(OBJECTS) | 90 $(LIBNAME): $(OBJECTS) |
75 $(AR) $(ARFLAGS) libtommath.a $(OBJECTS) | 91 $(AR) $(ARFLAGS) $@ $(OBJECTS) |
76 $(RANLIB) libtommath.a | 92 $(RANLIB) $@ |
77 | 93 |
78 #make a profiled library (takes a while!!!) | 94 #make a profiled library (takes a while!!!) |
79 # | 95 # |
80 # This will build the library with profile generation | 96 # This will build the library with profile generation |
81 # then run the test demo and rebuild the library. | 97 # then run the test demo and rebuild the library. |
93 $(CC) $(CFLAGS) -fprofile-arcs -DTESTING -c mpi.c -o mpi.o | 109 $(CC) $(CFLAGS) -fprofile-arcs -DTESTING -c mpi.c -o mpi.o |
94 $(CC) $(CFLAGS) -DTESTING -DTIMER demo/timing.c mpi.o -o ltmtest | 110 $(CC) $(CFLAGS) -DTESTING -DTIMER demo/timing.c mpi.o -o ltmtest |
95 ./ltmtest | 111 ./ltmtest |
96 rm -f *.o ltmtest | 112 rm -f *.o ltmtest |
97 $(CC) $(CFLAGS) -fbranch-probabilities -DTESTING -c mpi.c -o mpi.o | 113 $(CC) $(CFLAGS) -fbranch-probabilities -DTESTING -c mpi.c -o mpi.o |
98 $(AR) $(ARFLAGS) libtommath.a mpi.o | 114 $(AR) $(ARFLAGS) $(LIBNAME) mpi.o |
99 ranlib libtommath.a | 115 $(RANLIB) $(LIBNAME) |
100 | 116 |
101 install: libtommath.a | 117 install: $(LIBNAME) |
102 install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH) | 118 install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH) |
103 install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH) | 119 install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH) |
104 install -g $(GROUP) -o $(USER) $(LIBNAME) $(DESTDIR)$(LIBPATH) | 120 install -g $(GROUP) -o $(USER) $(LIBNAME) $(DESTDIR)$(LIBPATH) |
105 install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH) | 121 install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH) |
106 | 122 |
107 test: libtommath.a demo/demo.o | 123 test: $(LIBNAME) demo/demo.o |
108 $(CC) $(CFLAGS) demo/demo.o libtommath.a -o test | 124 $(CC) $(CFLAGS) demo/demo.o $(LIBNAME) -o test |
109 | 125 |
110 mtest: test | 126 mtest: test |
111 cd mtest ; $(CC) $(CFLAGS) mtest.c -o mtest | 127 cd mtest ; $(CC) $(CFLAGS) mtest.c -o mtest |
112 | 128 |
113 timing: libtommath.a | 129 timing: $(LIBNAME) |
114 $(CC) $(CFLAGS) -DTIMER demo/timing.c libtommath.a -o ltmtest | 130 $(CC) $(CFLAGS) -DTIMER demo/timing.c $(LIBNAME) -o ltmtest |
115 | 131 |
116 # makes the LTM book DVI file, requires tetex, perl and makeindex [part of tetex I think] | 132 # makes the LTM book DVI file, requires tetex, perl and makeindex [part of tetex I think] |
117 docdvi: tommath.src | 133 docdvi: tommath.src |
118 cd pics ; make | 134 cd pics ; MAKE=${MAKE} ${MAKE} |
119 echo "hello" > tommath.ind | 135 echo "hello" > tommath.ind |
120 perl booker.pl | 136 perl booker.pl |
121 latex tommath > /dev/null | 137 latex tommath > /dev/null |
122 latex tommath > /dev/null | 138 latex tommath > /dev/null |
123 makeindex tommath | 139 makeindex tommath |
130 | 146 |
131 # makes the LTM book PDF file, requires tetex, cleans up the LaTeX temp files | 147 # makes the LTM book PDF file, requires tetex, cleans up the LaTeX temp files |
132 docs: docdvi | 148 docs: docdvi |
133 dvipdf tommath | 149 dvipdf tommath |
134 rm -f tommath.log tommath.aux tommath.dvi tommath.idx tommath.toc tommath.lof tommath.ind tommath.ilg | 150 rm -f tommath.log tommath.aux tommath.dvi tommath.idx tommath.toc tommath.lof tommath.ind tommath.ilg |
135 cd pics ; make clean | 151 cd pics ; MAKE=${MAKE} ${MAKE} clean |
136 | 152 |
137 #LTM user manual | 153 #LTM user manual |
138 mandvi: bn.tex | 154 mandvi: bn.tex |
139 echo "hello" > bn.ind | 155 echo "hello" > bn.ind |
140 latex bn > /dev/null | 156 latex bn > /dev/null |
150 pretty: | 166 pretty: |
151 perl pretty.build | 167 perl pretty.build |
152 | 168 |
153 clean: | 169 clean: |
154 rm -f *.bat *.pdf *.o *.a *.obj *.lib *.exe *.dll etclib/*.o demo/demo.o test ltmtest mpitest mtest/mtest mtest/mtest.exe \ | 170 rm -f *.bat *.pdf *.o *.a *.obj *.lib *.exe *.dll etclib/*.o demo/demo.o test ltmtest mpitest mtest/mtest mtest/mtest.exe \ |
155 *.idx *.toc *.log *.aux *.dvi *.lof *.ind *.ilg *.ps *.log *.s mpi.c *.da *.dyn *.dpi tommath.tex *.lo *.la | 171 *.idx *.toc *.log *.aux *.dvi *.lof *.ind *.ilg *.ps *.log *.s mpi.c *.da *.dyn *.dpi tommath.tex `find . -type f | grep [~] | xargs` *.lo *.la |
156 rm -rf .libs | 172 rm -rf .libs |
157 cd etc && make clean | 173 cd etc ; MAKE=${MAKE} ${MAKE} clean |
158 cd pics && make clean | 174 cd pics ; MAKE=${MAKE} ${MAKE} clean |
175 | |
176 #zipup the project (take that!) | |
177 no_oops: clean | |
178 cd .. ; cvs commit | |
179 echo Scanning for scratch/dirty files | |
180 find . -type f | grep -v CVS | xargs -n 1 bash mess.sh | |
159 | 181 |
160 zipup: clean manual poster docs | 182 zipup: clean manual poster docs |
161 perl gen.pl ; mv mpi.c pre_gen/ ; \ | 183 perl gen.pl ; mv mpi.c pre_gen/ ; \ |
162 cd .. ; rm -rf ltm* libtommath-$(VERSION) ; mkdir libtommath-$(VERSION) ; \ | 184 cd .. ; rm -rf ltm* libtommath-$(VERSION) ; mkdir libtommath-$(VERSION) ; \ |
163 cp -R ./libtommath/* ./libtommath-$(VERSION)/ ; \ | 185 cp -R ./libtommath/* ./libtommath-$(VERSION)/ ; \ |
164 tar -c libtommath-$(VERSION)/* | bzip2 -9vvc > ltm-$(VERSION).tar.bz2 ; \ | 186 tar -c libtommath-$(VERSION)/* | bzip2 -9vvc > ltm-$(VERSION).tar.bz2 ; \ |
165 zip -9 -r ltm-$(VERSION).zip libtommath-$(VERSION)/* | 187 zip -9 -r ltm-$(VERSION).zip libtommath-$(VERSION)/* ; \ |
188 mv -f ltm* ~ ; rm -rf libtommath-$(VERSION) |