~ubuntu-branches/ubuntu/trusty/xulrunner/trusty

« back to all changes in this revision

Viewing changes to security/nss-fips/lib/freebl/mpi/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Devid Antonio Filoni
  • Date: 2008-08-25 13:04:18 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20080825130418-ck1i2ms384tzb9m0
Tags: 1.8.1.16+nobinonly-0ubuntu1
* New upstream release (taken from upstream CVS), LP: #254618.
* Fix MFSA 2008-35, MFSA 2008-34, MFSA 2008-33, MFSA 2008-32, MFSA 2008-31,
  MFSA 2008-30, MFSA 2008-29, MFSA 2008-28, MFSA 2008-27, MFSA 2008-25,
  MFSA 2008-24, MFSA 2008-23, MFSA 2008-22, MFSA 2008-21, MFSA 2008-26 also
  known as CVE-2008-2933, CVE-2008-2785, CVE-2008-2811, CVE-2008-2810,
  CVE-2008-2809, CVE-2008-2808, CVE-2008-2807, CVE-2008-2806, CVE-2008-2805,
  CVE-2008-2803, CVE-2008-2802, CVE-2008-2801, CVE-2008-2800, CVE-2008-2798.
* Drop 89_bz419350_attachment_306066 patch, merged upstream.
* Bump Standards-Version to 3.8.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Makefile for MPI library
 
3
 
 
4
# ***** BEGIN LICENSE BLOCK *****
 
5
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
6
#
 
7
# The contents of this file are subject to the Mozilla Public License Version
 
8
# 1.1 (the "License"); you may not use this file except in compliance with
 
9
# the License. You may obtain a copy of the License at
 
10
# http://www.mozilla.org/MPL/
 
11
#
 
12
# Software distributed under the License is distributed on an "AS IS" basis,
 
13
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 
14
# for the specific language governing rights and limitations under the
 
15
# License.
 
16
#
 
17
# The Original Code is the MPI Arbitrary Precision Integer Arithmetic library.
 
18
#
 
19
# The Initial Developer of the Original Code is
 
20
# Michael J. Fromberger <sting@linguist.dartmouth.edu>.
 
21
# Portions created by the Initial Developer are Copyright (C) 1998
 
22
# the Initial Developer. All Rights Reserved.
 
23
#
 
24
# Contributor(s):
 
25
#   Netscape Communications Corporation
 
26
#   Richard C. Swift        (swift@netscape.com)
 
27
#   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
 
28
#
 
29
# Alternatively, the contents of this file may be used under the terms of
 
30
# either the GNU General Public License Version 2 or later (the "GPL"), or
 
31
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 
32
# in which case the provisions of the GPL or the LGPL are applicable instead
 
33
# of those above. If you wish to allow use of your version of this file only
 
34
# under the terms of either the GPL or the LGPL, and not to allow others to
 
35
# use your version of this file under the terms of the MPL, indicate your
 
36
# decision by deleting the provisions above and replace them with the notice
 
37
# and other provisions required by the GPL or the LGPL. If you do not delete
 
38
# the provisions above, a recipient may use your version of this file under
 
39
# the terms of any one of the MPL, the GPL or the LGPL.
 
40
#
 
41
# ***** END LICENSE BLOCK *****
 
42
 
 
43
#
 
44
# $Id: Makefile,v 1.22.2.1 2006/03/03 04:17:49 nelson%bolyard.com Exp $
 
45
#
 
46
 
 
47
## Define CC to be the C compiler you wish to use.  The GNU cc
 
48
## compiler (gcc) should work, at the very least
 
49
#CC=cc
 
50
#CC=gcc
 
51
 
 
52
## 
 
53
## Define PERL to point to your local Perl interpreter.  It
 
54
## should be Perl 5.x, although it's conceivable that Perl 4
 
55
## might work ... I haven't tested it.
 
56
##
 
57
#PERL=/usr/bin/perl
 
58
PERL=perl
 
59
 
 
60
include target.mk
 
61
 
 
62
CFLAGS+= $(XCFLAGS)
 
63
 
 
64
##
 
65
## Define LIBS to include any libraries you need to link against.
 
66
## If NO_TABLE is define, LIBS should include '-lm' or whatever is
 
67
## necessary to bring in the math library.  Otherwise, it can be
 
68
## left alone, unless your system has other peculiar requirements.
 
69
##
 
70
LIBS=#-lmalloc#-lefence#-lm
 
71
 
 
72
## 
 
73
## Define RANLIB to be the library header randomizer; you might not
 
74
## need this on some systems (just set it to 'echo' on these systems,
 
75
## such as IRIX)
 
76
##
 
77
RANLIB=echo
 
78
 
 
79
##
 
80
## This is the version string used for the documentation and 
 
81
## building the distribution tarball.  Don't mess with it unless
 
82
## you are releasing a new version
 
83
VERS=1.7p6
 
84
 
 
85
## ----------------------------------------------------------------------
 
86
## You probably don't need to change anything below this line...
 
87
##
 
88
 
 
89
##
 
90
## This is the list of source files that need to be packed into
 
91
## the distribution file
 
92
SRCS=   mpi.c mpprime.c mplogic.c mp_gf2m.c mpmontg.c mpi-test.c primes.c \
 
93
        mpcpucache.c tests/ \
 
94
        utils/gcd.c utils/invmod.c utils/lap.c \
 
95
        utils/ptab.pl utils/sieve.c utils/isprime.c\
 
96
        utils/dec2hex.c utils/hex2dec.c utils/bbs_rand.c \
 
97
        utils/bbsrand.c utils/prng.c utils/primegen.c \
 
98
        utils/basecvt.c utils/makeprime.c\
 
99
        utils/fact.c utils/exptmod.c utils/pi.c utils/metime.c \
 
100
        utils/mpi.h utils/mpprime.h mulsqr.c \
 
101
        make-test-arrays test-arrays.txt all-tests make-logtab \
 
102
        types.pl stats timetest multest
 
103
 
 
104
## These are the header files that go into the distribution file
 
105
HDRS=mpi.h mpi-config.h utils/mpi.h utils/mpi-config.h mpprime.h mplogic.h mp_gf2m.h \
 
106
     mp_gf2m-priv.h utils/bbs_rand.h tests/mpi.h tests/mpprime.h
 
107
 
 
108
## These are the documentation files that go into the distribution file
 
109
DOCS=README doc utils/README utils/PRIMES 
 
110
 
 
111
## This is the list of tools built by 'make tools'
 
112
TOOLS=gcd invmod isprime lap dec2hex hex2dec primegen prng \
 
113
        basecvt fact exptmod pi makeprime identest
 
114
 
 
115
LIBOBJS = mpprime.o mpmontg.o mplogic.o mp_gf2m.o mpi.o mpcpucache.o $(AS_OBJS)
 
116
LIBHDRS = mpi-config.h mpi-priv.h mpi.h
 
117
APPHDRS = mpi-config.h mpi.h mplogic.h mp_gf2m.h mpprime.h
 
118
 
 
119
help:
 
120
        @ echo ""
 
121
        @ echo "The following targets can be built with this Makefile:"
 
122
        @ echo ""
 
123
        @ echo "libmpi.a     - arithmetic and prime testing library"
 
124
        @ echo "mpi-test     - test driver (requires MP_IOFUNC)"
 
125
        @ echo "tools        - command line tools"
 
126
        @ echo "doc          - manual pages for tools"
 
127
        @ echo "clean        - clean up objects and such"
 
128
        @ echo "distclean    - get ready for distribution"
 
129
        @ echo "dist         - distribution tarball"
 
130
        @ echo ""
 
131
 
 
132
.SUFFIXES: .c .o .i
 
133
 
 
134
.c.i:
 
135
        $(CC) $(CFLAGS) -E $< > $@
 
136
 
 
137
#.c.o: $*.h $*.c
 
138
#       $(CC) $(CFLAGS) -c $<
 
139
 
 
140
#---------------------------------------
 
141
 
 
142
$(LIBOBJS): $(LIBHDRS)
 
143
 
 
144
logtab.h: make-logtab
 
145
        $(PERL) make-logtab > logtab.h
 
146
 
 
147
mpi.o: mpi.c logtab.h $(LIBHDRS)
 
148
 
 
149
mplogic.o: mplogic.c mpi-priv.h mplogic.h $(LIBHDRS)
 
150
 
 
151
mp_gf2m.o: mp_gf2m.c mpi-priv.h mp_gf2m.h mp_gf2m-priv.h $(LIBHDRS)
 
152
 
 
153
mpmontg.o: mpmontg.c mpi-priv.h mplogic.h mpprime.h $(LIBHDRS)
 
154
 
 
155
mpprime.o: mpprime.c mpi-priv.h mpprime.h mplogic.h primes.c $(LIBHDRS)
 
156
 
 
157
mpcpucache.o: mpcpucache.c $(LIBHDRS)
 
158
 
 
159
mpi_mips.o: mpi_mips.s
 
160
        $(CC) -o $@ $(ASFLAGS) -c mpi_mips.s
 
161
 
 
162
mpi_sparc.o : montmulf.h
 
163
 
 
164
mpv_sparcv9.s: vis_64.il mpv_sparc.c
 
165
        $(CC) -o $@ $(SOLARIS_FPU_FLAGS) -S vis_64.il mpv_sparc.c
 
166
 
 
167
mpv_sparcv8.s: vis_64.il mpv_sparc.c
 
168
        $(CC) -o $@ $(SOLARIS_FPU_FLAGS) -S vis_32.il mpv_sparc.c
 
169
 
 
170
montmulfv8.o montmulfv9.o mpv_sparcv8.o mpv_sparcv9.o : %.o : %.s 
 
171
        $(CC) -o $@ $(SOLARIS_ASM_FLAGS) -c $<
 
172
 
 
173
# This rule is used to build the .s sources, which are then hand optimized.
 
174
#montmulfv8.s montmulfv9.s : montmulf%.s : montmulf%.il montmulf.c montmulf.h 
 
175
#       $(CC) -o $@ $(SOLARIS_ASM_FLAGS) -S montmulf$*.il montmulf.c
 
176
 
 
177
 
 
178
libmpi.a: $(LIBOBJS)
 
179
        ar -cvr libmpi.a $(LIBOBJS)
 
180
        $(RANLIB) libmpi.a
 
181
 
 
182
lib libs: libmpi.a
 
183
 
 
184
mpi.i: mpi.h
 
185
 
 
186
#---------------------------------------
 
187
 
 
188
MPTESTOBJS = mptest1.o mptest2.o mptest3.o mptest3a.o mptest4.o mptest4a.o \
 
189
        mptest4b.o mptest6.o mptest7.o mptest8.o mptest9.o mptestb.o
 
190
MPTESTS = $(MPTESTOBJS:.o=)
 
191
 
 
192
$(MPTESTOBJS): mptest%.o: tests/mptest-%.c $(LIBHDRS)
 
193
        $(CC) $(CFLAGS) -o $@ -c $<
 
194
 
 
195
$(MPTESTS): mptest%: mptest%.o libmpi.a
 
196
        $(CC) $(CFLAGS) -o $@ $^  $(LIBS)
 
197
 
 
198
tests: mptest1 mptest2 mptest3 mptest3a mptest4 mptest4a mptest4b mptest6 \
 
199
        mptestb bbsrand
 
200
 
 
201
utests: mptest7 mptest8 mptest9
 
202
 
 
203
#---------------------------------------
 
204
 
 
205
EXTRAOBJS = bbsrand.o bbs_rand.o prng.o
 
206
UTILOBJS = primegen.o metime.o identest.o basecvt.o fact.o exptmod.o pi.o \
 
207
        makeprime.o gcd.o invmod.o lap.o isprime.o \
 
208
        dec2hex.o hex2dec.o
 
209
UTILS = $(UTILOBJS:.o=) 
 
210
 
 
211
$(UTILS): % : %.o libmpi.a
 
212
        $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
 
213
 
 
214
$(UTILOBJS) $(EXTRAOBJS): %.o : utils/%.c $(LIBHDRS)
 
215
        $(CC) $(CFLAGS) -o $@ -c $<
 
216
 
 
217
prng: prng.o bbs_rand.o libmpi.a
 
218
        $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
 
219
 
 
220
bbsrand: bbsrand.o bbs_rand.o libmpi.a
 
221
        $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
 
222
 
 
223
utils: $(UTILS) prng bbsrand
 
224
 
 
225
#---------------------------------------
 
226
 
 
227
test-info.c: test-arrays.txt
 
228
        $(PERL) make-test-arrays test-arrays.txt > test-info.c
 
229
 
 
230
mpi-test.o: mpi-test.c test-info.c $(LIBHDRS)
 
231
        $(CC) $(CFLAGS) -o $@ -c $<
 
232
 
 
233
mpi-test: mpi-test.o libmpi.a
 
234
        $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
 
235
 
 
236
mdxptest.o: mdxptest.c $(LIBHDRS) mpi-priv.h
 
237
 
 
238
mdxptest: mdxptest.o libmpi.a
 
239
        $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
 
240
 
 
241
mulsqr.o: mulsqr.c logtab.h mpi.h mpi-config.h mpprime.h 
 
242
        $(CC) $(CFLAGS) -DMP_SQUARE=1 -o $@ -c mulsqr.c 
 
243
 
 
244
mulsqr: mulsqr.o libmpi.a
 
245
        $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
 
246
 
 
247
#---------------------------------------
 
248
 
 
249
alltests: tests utests mpi-test
 
250
 
 
251
tools: $(TOOLS)
 
252
 
 
253
doc:
 
254
        (cd doc; ./build)
 
255
 
 
256
clean:
 
257
        rm -f *.o *.a *.i
 
258
        rm -f core
 
259
        rm -f *~ .*~
 
260
        rm -f utils/*.o
 
261
        rm -f utils/core
 
262
        rm -f utils/*~ utils/.*~
 
263
 
 
264
clobber: clean
 
265
        rm -f $(TOOLS) $(UTILS)
 
266
 
 
267
distclean: clean
 
268
        rm -f mptest? mpi-test metime mulsqr karatsuba
 
269
        rm -f mptest?a mptest?b
 
270
        rm -f utils/mptest?
 
271
        rm -f test-info.c logtab.h
 
272
        rm -f libmpi.a
 
273
        rm -f $(TOOLS)
 
274
 
 
275
dist: Makefile $(HDRS) $(SRCS) $(DOCS)
 
276
        tar -cvf mpi-$(VERS).tar Makefile $(HDRS) $(SRCS) $(DOCS)
 
277
        pgps -ab mpi-$(VERS).tar
 
278
        chmod +r mpi-$(VERS).tar.asc
 
279
        gzip -9 mpi-$(VERS).tar
 
280
 
 
281
# END