security/nss/lib/freebl/mpi/Makefile.os2

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 #
michael@0 2 # Makefile.win - gmake Makefile for building MPI with VACPP on OS/2
michael@0 3 #
michael@0 4 # This Source Code Form is subject to the terms of the Mozilla Public
michael@0 5 # License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 6 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 7
michael@0 8 ## Define CC to be the C compiler you wish to use. The GNU cc
michael@0 9 ## compiler (gcc) should work, at the very least
michael@0 10 #CC=cc
michael@0 11 #CC=gcc
michael@0 12 CC=icc.exe
michael@0 13 AS=alp.exe
michael@0 14
michael@0 15 ##
michael@0 16 ## Define PERL to point to your local Perl interpreter. It
michael@0 17 ## should be Perl 5.x, although it's conceivable that Perl 4
michael@0 18 ## might work ... I haven't tested it.
michael@0 19 ##
michael@0 20 #PERL=/usr/bin/perl
michael@0 21 #PERL=perl
michael@0 22
michael@0 23 ##
michael@0 24 ## Define CFLAGS to contain any local options your compiler
michael@0 25 ## setup requires.
michael@0 26 ##
michael@0 27 ## Conditional compilation options are no longer here; see
michael@0 28 ## the file 'mpi-config.h' instead.
michael@0 29 ##
michael@0 30 MPICMN = -I. -DMP_API_COMPATIBLE -DMP_IOFUNC -DMP_USE_UINT_DIGIT -DMP_NO_MP_WORD
michael@0 31
michael@0 32 #OS/2
michael@0 33 AS_SRCS = mpi_x86.asm
michael@0 34 MPICMN += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE -DMP_ASSEMBLY_DIV_2DX1D
michael@0 35 #CFLAGS= -Od -Z7 -MD -W3 -nologo -D_X86_ -DXP_PC \
michael@0 36 -DDEBUG -D_DEBUG -UNDEBUG -DWIN32 -D_WINDOWS -DWIN95 $(MPICMN)
michael@0 37 #CFLAGS = -O2 -MD -W3 -nologo -D_X86_ -DXP_PC -UDEBUG -U_DEBUG -DNDEBUG \
michael@0 38 -DWIN32 -D_WINDOWS -DWIN95 $(MPICMN)
michael@0 39 #CFLAGS = -Od -Z7 -MD -W3 -nologo -D_X86_ -DXP_PC -UDEBUG -U_DEBUG -DNDEBUG \
michael@0 40 -DWIN32 -D_WINDOWS -DWIN95 $(MPICMN)
michael@0 41 CFLAGS = /Ti+ -D_X86_ -DXP_PC -UDEBUG -U_DEBUG -DNDEBUG \
michael@0 42 $(MPICMN)
michael@0 43 ASFLAGS =
michael@0 44
michael@0 45 ##
michael@0 46 ## Define LIBS to include any libraries you need to link against.
michael@0 47 ## If NO_TABLE is define, LIBS should include '-lm' or whatever is
michael@0 48 ## necessary to bring in the math library. Otherwise, it can be
michael@0 49 ## left alone, unless your system has other peculiar requirements.
michael@0 50 ##
michael@0 51 LIBS=#-lmalloc#-lefence#-lm
michael@0 52
michael@0 53 ##
michael@0 54 ## Define RANLIB to be the library header randomizer; you might not
michael@0 55 ## need this on some systems (just set it to 'echo' on these systems,
michael@0 56 ## such as IRIX)
michael@0 57 ##
michael@0 58 RANLIB=echo
michael@0 59
michael@0 60 ##
michael@0 61 ## This is the version string used for the documentation and
michael@0 62 ## building the distribution tarball. Don't mess with it unless
michael@0 63 ## you are releasing a new version
michael@0 64 VERS=1.7p6
michael@0 65
michael@0 66 ## ----------------------------------------------------------------------
michael@0 67 ## You probably don't need to change anything below this line...
michael@0 68 ##
michael@0 69
michael@0 70 ##
michael@0 71 ## This is the list of source files that need to be packed into
michael@0 72 ## the distribution file
michael@0 73 SRCS= mpi.c mpprime.c mplogic.c mpmontg.c mpi-test.c primes.c tests/ \
michael@0 74 utils/gcd.c utils/invmod.c utils/lap.c \
michael@0 75 utils/ptab.pl utils/sieve.c utils/isprime.c\
michael@0 76 utils/dec2hex.c utils/hex2dec.c utils/bbs_rand.c \
michael@0 77 utils/bbsrand.c utils/prng.c utils/primegen.c \
michael@0 78 utils/basecvt.c utils/makeprime.c\
michael@0 79 utils/fact.c utils/exptmod.c utils/pi.c utils/metime.c \
michael@0 80 utils/mpi.h utils/mpprime.h mulsqr.c \
michael@0 81 make-test-arrays test-arrays.txt all-tests make-logtab \
michael@0 82 types.pl stats timetest multest
michael@0 83
michael@0 84 ## These are the header files that go into the distribution file
michael@0 85 HDRS=mpi.h mpi-config.h utils/mpi.h utils/mpi-config.h mpprime.h mplogic.h \
michael@0 86 utils/bbs_rand.h tests/mpi.h tests/mpprime.h
michael@0 87
michael@0 88 ## These are the documentation files that go into the distribution file
michael@0 89 DOCS=README doc utils/README utils/PRIMES
michael@0 90
michael@0 91 ## This is the list of tools built by 'make tools'
michael@0 92 TOOLS=gcd.exe invmod.exe isprime.exe lap.exe dec2hex.exe hex2dec.exe \
michael@0 93 primegen.exe prng.exe basecvt.exe fact.exe exptmod.exe pi.exe makeprime.exe
michael@0 94
michael@0 95 AS_OBJS = $(AS_SRCS:.asm=.obj)
michael@0 96 LIBOBJS = mpprime.obj mpmontg.obj mplogic.obj mpi.obj $(AS_OBJS)
michael@0 97 LIBHDRS = mpi-config.h mpi-priv.h mpi.h
michael@0 98 APPHDRS = mpi-config.h mpi.h mplogic.h mpprime.h
michael@0 99
michael@0 100
michael@0 101 help:
michael@0 102 @ echo ""
michael@0 103 @ echo "The following targets can be built with this Makefile:"
michael@0 104 @ echo ""
michael@0 105 @ echo "mpi.lib - arithmetic and prime testing library"
michael@0 106 @ echo "mpi-test.exe - test driver (requires MP_IOFUNC)"
michael@0 107 @ echo "tools - command line tools"
michael@0 108 @ echo "doc - manual pages for tools"
michael@0 109 @ echo "clean - clean up objects and such"
michael@0 110 @ echo "distclean - get ready for distribution"
michael@0 111 @ echo "dist - distribution tarball"
michael@0 112 @ echo ""
michael@0 113
michael@0 114 .SUFFIXES: .c .obj .i .lib .exe .asm
michael@0 115
michael@0 116 .c.i:
michael@0 117 $(CC) $(CFLAGS) -E $< > $@
michael@0 118
michael@0 119 .c.obj:
michael@0 120 $(CC) $(CFLAGS) -c $<
michael@0 121
michael@0 122 .asm.obj:
michael@0 123 $(AS) $(ASFLAGS) $<
michael@0 124
michael@0 125 .obj.exe:
michael@0 126 $(CC) $(CFLAGS) -Fo$@ $<
michael@0 127
michael@0 128 #---------------------------------------
michael@0 129
michael@0 130 $(LIBOBJS): $(LIBHDRS)
michael@0 131
michael@0 132 logtab.h: make-logtab
michael@0 133 $(PERL) make-logtab > logtab.h
michael@0 134
michael@0 135 mpi.obj: mpi.c logtab.h $(LIBHDRS)
michael@0 136
michael@0 137 mplogic.obj: mplogic.c mpi-priv.h mplogic.h $(LIBHDRS)
michael@0 138
michael@0 139 mpmontg.obj: mpmontg.c mpi-priv.h mplogic.h mpprime.h $(LIBHDRS)
michael@0 140
michael@0 141 mpprime.obj: mpprime.c mpi-priv.h mpprime.h mplogic.h primes.c $(LIBHDRS)
michael@0 142
michael@0 143 mpi_mips.obj: mpi_mips.s
michael@0 144 $(CC) -Fo$@ $(ASFLAGS) -c mpi_mips.s
michael@0 145
michael@0 146 mpi.lib: $(LIBOBJS)
michael@0 147 ilib /out:mpi.lib $(LIBOBJS)
michael@0 148 $(RANLIB) mpi.lib
michael@0 149
michael@0 150 lib libs: mpi.lib
michael@0 151
michael@0 152 #---------------------------------------
michael@0 153
michael@0 154 MPTESTOBJS = mptest1.obj mptest2.obj mptest3.obj mptest3a.obj mptest4.obj \
michael@0 155 mptest4a.obj mptest4b.obj mptest6.obj mptest7.obj mptest8.obj mptest9.obj
michael@0 156 MPTESTS = $(MPTESTOBJS:.obj=.exe)
michael@0 157
michael@0 158 $(MPTESTOBJS): mptest%.obj: tests/mptest-%.c $(LIBHDRS)
michael@0 159 $(CC) $(CFLAGS) -Fo$@ -c $<
michael@0 160
michael@0 161 $(MPTESTS): mptest%.exe: mptest%.obj mpi.lib $(LIBS)
michael@0 162 $(CC) $(CFLAGS) -Fo$@ $^
michael@0 163
michael@0 164 tests: mptest1.exe mptest2.exe mptest3.exe mptest3a.exe mptest4.exe \
michael@0 165 mptest4a.exe mptest4b.exe mptest6.exe bbsrand.exe
michael@0 166
michael@0 167 utests: mptest7.exe mptest8.exe mptest9.exe
michael@0 168
michael@0 169 #---------------------------------------
michael@0 170
michael@0 171 EXTRAOBJS = bbsrand.obj bbs_rand.obj prng.obj
michael@0 172 UTILOBJS = primegen.obj metime.obj identest.obj basecvt.obj fact.obj \
michael@0 173 exptmod.obj pi.obj makeprime.obj karatsuba.obj gcd.obj invmod.obj lap.obj \
michael@0 174 isprime.obj dec2hex.obj hex2dec.obj
michael@0 175 UTILS = $(UTILOBJS:.obj=.exe)
michael@0 176
michael@0 177 $(UTILS): %.exe : %.obj mpi.lib $(LIBS)
michael@0 178 $(CC) $(CFLAGS) -Fo$@ $^
michael@0 179
michael@0 180 $(UTILOBJS) $(EXTRAOBJS): %.obj : utils/%.c $(LIBHDRS)
michael@0 181 $(CC) $(CFLAGS) -Fo$@ -c $<
michael@0 182
michael@0 183 prng.exe: prng.obj bbs_rand.obj mpi.lib $(LIBS)
michael@0 184 $(CC) $(CFLAGS) -Fo$@ $^
michael@0 185
michael@0 186 bbsrand.exe: bbsrand.obj bbs_rand.obj mpi.lib $(LIBS)
michael@0 187 $(CC) $(CFLAGS) -Fo$@ $^
michael@0 188
michael@0 189 utils: $(UTILS) prng.exe bbsrand.exe
michael@0 190
michael@0 191 #---------------------------------------
michael@0 192
michael@0 193 test-info.c: test-arrays.txt
michael@0 194 $(PERL) make-test-arrays test-arrays.txt > test-info.c
michael@0 195
michael@0 196 mpi-test.obj: mpi-test.c test-info.c $(LIBHDRS)
michael@0 197 $(CC) $(CFLAGS) -Fo$@ -c $<
michael@0 198
michael@0 199 mpi-test.exe: mpi-test.obj mpi.lib $(LIBS)
michael@0 200 $(CC) $(CFLAGS) -Fo$@ $^
michael@0 201
michael@0 202 mdxptest.obj: mdxptest.c $(LIBHDRS) mpi-priv.h
michael@0 203
michael@0 204 mdxptest.exe: mdxptest.obj mpi.lib $(LIBS)
michael@0 205 $(CC) $(CFLAGS) -Fo$@ $^
michael@0 206
michael@0 207 mulsqr.obj: mulsqr.c logtab.h mpi.h mpi-config.h mpprime.h
michael@0 208 $(CC) $(CFLAGS) -DMP_SQUARE=1 -Fo$@ -c mulsqr.c
michael@0 209
michael@0 210 mulsqr.exe: mulsqr.obj mpi.lib $(LIBS)
michael@0 211 $(CC) $(CFLAGS) -Fo$@ $^
michael@0 212
michael@0 213 #---------------------------------------
michael@0 214
michael@0 215 alltests: tests utests mpi-test.exe
michael@0 216
michael@0 217 tools: $(TOOLS)
michael@0 218
michael@0 219 doc:
michael@0 220 (cd doc; ./build)
michael@0 221
michael@0 222 clean:
michael@0 223 rm -f *.obj *.lib *.pdb *.ilk
michael@0 224 cd utils; rm -f *.obj *.lib *.pdb *.ilk
michael@0 225
michael@0 226 distclean: clean
michael@0 227 rm -f mptest? mpi-test metime mulsqr karatsuba
michael@0 228 rm -f mptest?a mptest?b
michael@0 229 rm -f utils/mptest?
michael@0 230 rm -f test-info.c logtab.h
michael@0 231 rm -f mpi.lib
michael@0 232 rm -f $(TOOLS)
michael@0 233
michael@0 234 dist: Makefile $(HDRS) $(SRCS) $(DOCS)
michael@0 235 tar -cvf mpi-$(VERS).tar Makefile $(HDRS) $(SRCS) $(DOCS)
michael@0 236 pgps -ab mpi-$(VERS).tar
michael@0 237 chmod +r mpi-$(VERS).tar.asc
michael@0 238 gzip -9 mpi-$(VERS).tar
michael@0 239
michael@0 240
michael@0 241 print:
michael@0 242 @echo LIBOBJS = $(LIBOBJS)
michael@0 243 # END

mercurial