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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/nss/lib/freebl/mpi/Makefile.os2	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,243 @@
     1.4 +#
     1.5 +# Makefile.win - gmake Makefile for building MPI with VACPP on OS/2
     1.6 +#
     1.7 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.8 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.9 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
    1.10 +
    1.11 +## Define CC to be the C compiler you wish to use.  The GNU cc
    1.12 +## compiler (gcc) should work, at the very least
    1.13 +#CC=cc
    1.14 +#CC=gcc
    1.15 +CC=icc.exe
    1.16 +AS=alp.exe
    1.17 +
    1.18 +## 
    1.19 +## Define PERL to point to your local Perl interpreter.  It
    1.20 +## should be Perl 5.x, although it's conceivable that Perl 4
    1.21 +## might work ... I haven't tested it.
    1.22 +##
    1.23 +#PERL=/usr/bin/perl
    1.24 +#PERL=perl
    1.25 +
    1.26 +##
    1.27 +## Define CFLAGS to contain any local options your compiler
    1.28 +## setup requires.
    1.29 +##
    1.30 +## Conditional compilation options are no longer here; see
    1.31 +## the file 'mpi-config.h' instead.
    1.32 +##
    1.33 +MPICMN = -I. -DMP_API_COMPATIBLE -DMP_IOFUNC -DMP_USE_UINT_DIGIT -DMP_NO_MP_WORD
    1.34 +
    1.35 +#OS/2
    1.36 +AS_SRCS = mpi_x86.asm
    1.37 +MPICMN += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE -DMP_ASSEMBLY_DIV_2DX1D
    1.38 +#CFLAGS= -Od -Z7 -MD -W3 -nologo -D_X86_ -DXP_PC \
    1.39 + -DDEBUG -D_DEBUG -UNDEBUG -DWIN32 -D_WINDOWS -DWIN95 $(MPICMN)
    1.40 +#CFLAGS = -O2 -MD -W3 -nologo -D_X86_ -DXP_PC -UDEBUG -U_DEBUG -DNDEBUG \
    1.41 + -DWIN32 -D_WINDOWS -DWIN95 $(MPICMN)
    1.42 +#CFLAGS = -Od -Z7 -MD -W3 -nologo -D_X86_ -DXP_PC -UDEBUG -U_DEBUG -DNDEBUG \
    1.43 + -DWIN32 -D_WINDOWS -DWIN95 $(MPICMN)
    1.44 +CFLAGS = /Ti+ -D_X86_ -DXP_PC -UDEBUG -U_DEBUG -DNDEBUG \
    1.45 + $(MPICMN)
    1.46 +ASFLAGS =
    1.47 +
    1.48 +##
    1.49 +## Define LIBS to include any libraries you need to link against.
    1.50 +## If NO_TABLE is define, LIBS should include '-lm' or whatever is
    1.51 +## necessary to bring in the math library.  Otherwise, it can be
    1.52 +## left alone, unless your system has other peculiar requirements.
    1.53 +##
    1.54 +LIBS=#-lmalloc#-lefence#-lm
    1.55 +
    1.56 +## 
    1.57 +## Define RANLIB to be the library header randomizer; you might not
    1.58 +## need this on some systems (just set it to 'echo' on these systems,
    1.59 +## such as IRIX)
    1.60 +##
    1.61 +RANLIB=echo
    1.62 +
    1.63 +##
    1.64 +## This is the version string used for the documentation and 
    1.65 +## building the distribution tarball.  Don't mess with it unless
    1.66 +## you are releasing a new version
    1.67 +VERS=1.7p6
    1.68 +
    1.69 +## ----------------------------------------------------------------------
    1.70 +## You probably don't need to change anything below this line...
    1.71 +##
    1.72 +
    1.73 +##
    1.74 +## This is the list of source files that need to be packed into
    1.75 +## the distribution file
    1.76 +SRCS=   mpi.c mpprime.c mplogic.c mpmontg.c mpi-test.c primes.c tests/ \
    1.77 +	utils/gcd.c utils/invmod.c utils/lap.c \
    1.78 +	utils/ptab.pl utils/sieve.c utils/isprime.c\
    1.79 +	utils/dec2hex.c utils/hex2dec.c utils/bbs_rand.c \
    1.80 +	utils/bbsrand.c utils/prng.c utils/primegen.c \
    1.81 +	utils/basecvt.c utils/makeprime.c\
    1.82 +	utils/fact.c utils/exptmod.c utils/pi.c utils/metime.c \
    1.83 +	utils/mpi.h utils/mpprime.h mulsqr.c \
    1.84 +	make-test-arrays test-arrays.txt all-tests make-logtab \
    1.85 +	types.pl stats timetest multest
    1.86 +
    1.87 +## These are the header files that go into the distribution file
    1.88 +HDRS=mpi.h mpi-config.h utils/mpi.h utils/mpi-config.h mpprime.h mplogic.h \
    1.89 +     utils/bbs_rand.h tests/mpi.h tests/mpprime.h
    1.90 +
    1.91 +## These are the documentation files that go into the distribution file
    1.92 +DOCS=README doc utils/README utils/PRIMES 
    1.93 +
    1.94 +## This is the list of tools built by 'make tools'
    1.95 +TOOLS=gcd.exe invmod.exe isprime.exe lap.exe dec2hex.exe hex2dec.exe \
    1.96 + primegen.exe prng.exe basecvt.exe fact.exe exptmod.exe pi.exe makeprime.exe
    1.97 +
    1.98 +AS_OBJS = $(AS_SRCS:.asm=.obj)
    1.99 +LIBOBJS = mpprime.obj mpmontg.obj mplogic.obj mpi.obj $(AS_OBJS)
   1.100 +LIBHDRS = mpi-config.h mpi-priv.h mpi.h
   1.101 +APPHDRS = mpi-config.h mpi.h mplogic.h mpprime.h
   1.102 +
   1.103 +
   1.104 +help:
   1.105 +	@ echo ""
   1.106 +	@ echo "The following targets can be built with this Makefile:"
   1.107 +	@ echo ""
   1.108 +	@ echo "mpi.lib      - arithmetic and prime testing library"
   1.109 +	@ echo "mpi-test.exe - test driver (requires MP_IOFUNC)"
   1.110 +	@ echo "tools        - command line tools"
   1.111 +	@ echo "doc          - manual pages for tools"
   1.112 +	@ echo "clean        - clean up objects and such"
   1.113 +	@ echo "distclean    - get ready for distribution"
   1.114 +	@ echo "dist         - distribution tarball"
   1.115 +	@ echo ""
   1.116 +
   1.117 +.SUFFIXES: .c .obj .i .lib .exe .asm
   1.118 +
   1.119 +.c.i:
   1.120 +	$(CC) $(CFLAGS) -E $< > $@
   1.121 +
   1.122 +.c.obj: 
   1.123 +	$(CC) $(CFLAGS) -c $<
   1.124 +
   1.125 +.asm.obj:
   1.126 +	$(AS) $(ASFLAGS) $<
   1.127 +
   1.128 +.obj.exe:
   1.129 +	$(CC) $(CFLAGS) -Fo$@ $<
   1.130 +
   1.131 +#---------------------------------------
   1.132 +
   1.133 +$(LIBOBJS): $(LIBHDRS)
   1.134 +
   1.135 +logtab.h: make-logtab
   1.136 +	$(PERL) make-logtab > logtab.h
   1.137 +
   1.138 +mpi.obj: mpi.c logtab.h $(LIBHDRS)
   1.139 +
   1.140 +mplogic.obj: mplogic.c mpi-priv.h mplogic.h $(LIBHDRS)
   1.141 +
   1.142 +mpmontg.obj: mpmontg.c mpi-priv.h mplogic.h mpprime.h $(LIBHDRS)
   1.143 +
   1.144 +mpprime.obj: mpprime.c mpi-priv.h mpprime.h mplogic.h primes.c $(LIBHDRS)
   1.145 +
   1.146 +mpi_mips.obj: mpi_mips.s
   1.147 +	$(CC) -Fo$@ $(ASFLAGS) -c mpi_mips.s
   1.148 +
   1.149 +mpi.lib: $(LIBOBJS)
   1.150 +	ilib /out:mpi.lib $(LIBOBJS)
   1.151 +	$(RANLIB) mpi.lib
   1.152 +
   1.153 +lib libs: mpi.lib
   1.154 +
   1.155 +#---------------------------------------
   1.156 +
   1.157 +MPTESTOBJS = mptest1.obj mptest2.obj mptest3.obj mptest3a.obj mptest4.obj \
   1.158 + mptest4a.obj mptest4b.obj mptest6.obj mptest7.obj mptest8.obj mptest9.obj
   1.159 +MPTESTS = $(MPTESTOBJS:.obj=.exe)
   1.160 +
   1.161 +$(MPTESTOBJS): mptest%.obj: tests/mptest-%.c $(LIBHDRS)
   1.162 +	$(CC) $(CFLAGS) -Fo$@ -c $<
   1.163 +
   1.164 +$(MPTESTS): mptest%.exe: mptest%.obj mpi.lib $(LIBS)
   1.165 +	$(CC) $(CFLAGS) -Fo$@ $^ 
   1.166 +
   1.167 +tests: mptest1.exe mptest2.exe mptest3.exe mptest3a.exe mptest4.exe \
   1.168 + mptest4a.exe mptest4b.exe mptest6.exe bbsrand.exe
   1.169 +
   1.170 +utests: mptest7.exe mptest8.exe mptest9.exe
   1.171 +
   1.172 +#---------------------------------------
   1.173 +
   1.174 +EXTRAOBJS = bbsrand.obj bbs_rand.obj prng.obj
   1.175 +UTILOBJS = primegen.obj metime.obj identest.obj basecvt.obj fact.obj \
   1.176 + exptmod.obj pi.obj makeprime.obj karatsuba.obj gcd.obj invmod.obj lap.obj \
   1.177 + isprime.obj dec2hex.obj hex2dec.obj
   1.178 +UTILS = $(UTILOBJS:.obj=.exe) 
   1.179 +
   1.180 +$(UTILS): %.exe : %.obj mpi.lib $(LIBS)
   1.181 +	$(CC) $(CFLAGS) -Fo$@ $^ 
   1.182 +
   1.183 +$(UTILOBJS) $(EXTRAOBJS): %.obj : utils/%.c $(LIBHDRS)
   1.184 +	$(CC) $(CFLAGS) -Fo$@ -c $<
   1.185 +
   1.186 +prng.exe: prng.obj bbs_rand.obj mpi.lib $(LIBS)
   1.187 +	$(CC) $(CFLAGS) -Fo$@ $^
   1.188 +
   1.189 +bbsrand.exe: bbsrand.obj bbs_rand.obj mpi.lib $(LIBS)
   1.190 +	$(CC) $(CFLAGS) -Fo$@ $^
   1.191 +
   1.192 +utils: $(UTILS) prng.exe bbsrand.exe
   1.193 +
   1.194 +#---------------------------------------
   1.195 +
   1.196 +test-info.c: test-arrays.txt
   1.197 +	$(PERL) make-test-arrays test-arrays.txt > test-info.c
   1.198 +
   1.199 +mpi-test.obj: mpi-test.c test-info.c $(LIBHDRS)
   1.200 +	$(CC) $(CFLAGS) -Fo$@ -c $<
   1.201 +
   1.202 +mpi-test.exe: mpi-test.obj mpi.lib $(LIBS)
   1.203 +	$(CC) $(CFLAGS) -Fo$@ $^
   1.204 +
   1.205 +mdxptest.obj: mdxptest.c $(LIBHDRS) mpi-priv.h
   1.206 +
   1.207 +mdxptest.exe: mdxptest.obj mpi.lib $(LIBS)
   1.208 +	$(CC) $(CFLAGS) -Fo$@ $^
   1.209 +
   1.210 +mulsqr.obj: mulsqr.c logtab.h mpi.h mpi-config.h mpprime.h 
   1.211 +	$(CC) $(CFLAGS) -DMP_SQUARE=1 -Fo$@ -c mulsqr.c 
   1.212 +
   1.213 +mulsqr.exe: mulsqr.obj mpi.lib $(LIBS)
   1.214 +	$(CC) $(CFLAGS) -Fo$@ $^
   1.215 +
   1.216 +#---------------------------------------
   1.217 +
   1.218 +alltests: tests utests mpi-test.exe
   1.219 +
   1.220 +tools: $(TOOLS)
   1.221 +
   1.222 +doc:
   1.223 +	(cd doc; ./build)
   1.224 +
   1.225 +clean:
   1.226 +	rm -f *.obj *.lib *.pdb *.ilk
   1.227 +	cd utils; rm -f *.obj *.lib *.pdb *.ilk
   1.228 +
   1.229 +distclean: clean
   1.230 +	rm -f mptest? mpi-test metime mulsqr karatsuba
   1.231 +	rm -f mptest?a mptest?b
   1.232 +	rm -f utils/mptest?
   1.233 +	rm -f test-info.c logtab.h
   1.234 +	rm -f mpi.lib
   1.235 +	rm -f $(TOOLS)
   1.236 +
   1.237 +dist: Makefile $(HDRS) $(SRCS) $(DOCS)
   1.238 +	tar -cvf mpi-$(VERS).tar Makefile $(HDRS) $(SRCS) $(DOCS)
   1.239 +	pgps -ab mpi-$(VERS).tar
   1.240 +	chmod +r mpi-$(VERS).tar.asc
   1.241 +	gzip -9 mpi-$(VERS).tar
   1.242 +
   1.243 +
   1.244 +print: 
   1.245 +	@echo LIBOBJS = $(LIBOBJS)
   1.246 +# END

mercurial