<commit_before>##
## Makefile for MPI library
##
## The contents of this file are subject to the Mozilla Public
## License Version 1.1 (the "License"); you may not use this file
## except in compliance with the License. You may obtain a copy of
## the License at http://www.mozilla.org/MPL/
##
## Software distributed under the License is distributed on an "AS
## IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
## implied. See the License for the specific language governing
## rights and limitations under the License.
##
## The Original Code is the MPI Arbitrary Precision Integer Arithmetic
## library.
##
## The Initial Developer of the Original Code is 
## <NAME> <<EMAIL>>
##
## Portions created by <NAME> are 
## Copyright (C) 1998, 2000 <NAME>. All Rights Reserved.
##
## Contributor(s):
##
## Alternatively, the contents of this file may be used under the
## terms of the GNU General Public License Version 2 or later (the
## "GPL"), in which case the provisions of the GPL are applicable
## instead of those above.  If you wish to allow use of your
## version of this file only under the terms of the GPL and not to
## allow others to use your version of this file under the MPL,
## indicate your decision by deleting the provisions above and
## replace them with the notice and other provisions required by
## the GPL.  If you do not delete the provisions above, a recipient
## may use your version of this file under either the MPL or the
## GPL.
## 
##
## $Id$
##

## Define CC to be the C compiler you wish to use.  The GNU cc
## compiler (gcc) should work, at the very least
#CC=cc
CC=gcc

## 
## Define PERL to point to your local Perl interpreter.  It
## should be Perl 5.x, although it's conceivable that Perl 4
## might work ... I haven't tested it.
##
PERL=/usr/bin/perl

##
## Define CFLAGS to contain any local options your compiler
## setup requires.
##
## Conditional compilation options are no longer here; see
## the file 'mpi-config.h' instead.
##
#CFLAGS=-ansi -fullwarn -woff 1521 -O3
#CFLAGS=-ansi -fullwarn -woff 1521 -L/usr/linguist/lib -g -DMP_DEBUG=1
CFLAGS=-ansi -pedantic -Wall -O3
#CFLAGS=-ansi -pedantic -Wall -g -O2 -DMP_DEBUG=1

##
## Define LIBS to include any libraries you need to link against.
## If NO_TABLE is define, LIBS should include '-lm' or whatever is
## necessary to bring in the math library.  Otherwise, it can be
## left alone, unless your system has other peculiar requirements.
##
LIBS=#-lmalloc#-lefence#-lm

## 
## Define RANLIB to be the library header randomizer; you might not
## need this on some systems (just set it to 'echo' on these systems,
## such as IRIX)
##
RANLIB=echo

##
## This is the version string used for the documentation and 
## building the distribution tarball.  Don't mess with it unless
## you are releasing a new version
VERS=1.7p6

## ----------------------------------------------------------------------
## You probably don't need to change anything below this line...
##

##
## This is the list of source files that need to be packed into
## the distribution file
SRCS=   mpi.c mpprime.c mplogic.c mpi-test.c primes.c tests/ \
	utils/gcd.c utils/invmod.c utils/lap.c \
	utils/ptab.pl utils/sieve.c utils/isprime.c\
	utils/dec2hex.c utils/hex2dec.c utils/bbs_rand.c \
	utils/bbsrand.c utils/prng.c utils/primegen.c \
	utils/basecvt.c utils/makeprime.c\
	utils/fact.c utils/exptmod.c utils/pi.c utils/metime.c \
	utils/mpi.h utils/mpprime.h mulsqr.c karatsuba.c \
	make-test-arrays test-arrays.txt all-tests make-logtab \
	types.pl stats timetest multest

## These are the header files that go into the distribution file
HDRS=mpi.h mpi-config.h utils/mpi.h utils/mpi-config.h mpprime.h \
	mplogic.h utils/bbs_rand.h tests/mpi.h tests/mpprime.h

## These are the documentation files that go into the distribution file
DOCS=README doc \
	utils/README utils/PRIMES 

## This is the list of tools built by 'make tools'
TOOLS=gcd invmod isprime lap dec2hex hex2dec primegen prng \
	basecvt fact exptmod pi makeprime

help:
	@ echo ""
	@ echo "The following targets can be built with this Makefile:"
	@ echo ""
	@ echo "libmpi       - arithmetic and prime testing library"
	@ echo "tests        - test drivers (requires MP_IOFUNC)"
	@ echo "tools        - command line tools"
	@ echo "doc          - manual pages for tools"
	@ echo "clean        - clean up objects and such"
	@ echo "distclean    - get ready for distribution"
	@ echo "dist         - distribution tarball"
	@ echo ""

.c.o: $*.h $*.c
	$(CC) $(CFLAGS) -c $<

mpi.o: mpi-config.h logtab.h mpi.h mpi.c
	$(CC) $(CFLAGS) -c mpi.c

libmpi: mpi.o mpprime.o
	ar -cvr libmpi.a mpi.o mpprime.o
	$(RANLIB) libmpi.a

logtab.h: make-logtab
	$(PERL) make-logtab > logtab.h

mptest1: mpi.o tests/mptest-1.c
	$(CC) $(CFLAGS) -o mptest1 mpi.o tests/mptest-1.c $(LIBS)

mptest2: mpi.o tests/mptest-2.c
	$(CC) $(CFLAGS) -o mptest2 mpi.o tests/mptest-2.c $(LIBS)

mptest3: mpi.o tests/mptest-3.c
	$(CC) $(CFLAGS) -o mptest3 mpi.o tests/mptest-3.c $(LIBS)

mptest3a: mpprime.o mpi.o tests/mptest-3a.c
	$(CC) $(CFLAGS) -o mptest3a mpprime.o mpi.o tests/mptest-3a.c $(LIBS)

mptest4: mpi.o tests/mptest-4.c
	$(CC) $(CFLAGS) -o mptest4 mpi.o tests/mptest-4.c $(LIBS)

mptest4a: mpi.o mpprime.o tests/mptest-4a.c
	$(CC) $(CFLAGS) -o mptest4a mpi.o mpprime.o tests/mptest-4a.c $(LIBS)
<commit_msg>Get file to work with SysV make on IRIX. Add .i target (preprocessor output).<commit_after>##
## Makefile for MPI library
##
## The contents of this file are subject to the Mozilla Public
## License Version 1.1 (the "License"); you may not use this file
## except in compliance with the License. You may obtain a copy of
## the License at http://www.mozilla.org/MPL/
##
## Software distributed under the License is distributed on an "AS
## IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
## implied. See the License for the specific language governing
## rights and limitations under the License.
##
## The Original Code is the MPI Arbitrary Precision Integer Arithmetic
## library.
##
## The Initial Developer of the Original Code is 
## <NAME> <<EMAIL>>
##
## Portions created by <NAME> are 
## Copyright (C) 1998, 2000 <NAME>. All Rights Reserved.
##
## Contributor(s):
##	Netscape Communications Corporation
##
## Alternatively, the contents of this file may be used under the
## terms of the GNU General Public License Version 2 or later (the
## "GPL"), in which case the provisions of the GPL are applicable
## instead of those above.  If you wish to allow use of your
## version of this file only under the terms of the GPL and not to
## allow others to use your version of this file under the MPL,
## indicate your decision by deleting the provisions above and
## replace them with the notice and other provisions required by
## the GPL.  If you do not delete the provisions above, a recipient
## may use your version of this file under either the MPL or the
## GPL.
## 
##
## $Id$
##

## Define CC to be the C compiler you wish to use.  The GNU cc
## compiler (gcc) should work, at the very least
#CC=cc
#CC=gcc

## 
## Define PERL to point to your local Perl interpreter.  It
## should be Perl 5.x, although it's conceivable that Perl 4
## might work ... I haven't tested it.
##
#PERL=/usr/bin/perl
PERL=perl

##
## Define CFLAGS to contain any local options your compiler
## setup requires.
##
## Conditional compilation options are no longer here; see
## the file 'mpi-config.h' instead.
##
#CFLAGS=-ansi -fullwarn -woff 1521 -O3 -I.
#CFLAGS=-ansi -fullwarn -woff 1521 -L/usr/linguist/lib -g -DMP_DEBUG=1 -I.
#CFLAGS=-ansi -pedantic -Wall -O3 -I.
#CFLAGS=-ansi -n32 -O3 -woff 1429 -D_SGI_SOURCE -DMP_IOFUNC -DUSE_32 -I.
#CFLAGS=-ansi -n32 -O3 -woff 1429 -D_SGI_SOURCE -DMP_IOFUNC -I.
#CFLAGS=-ansi -n32 -g -woff 1429 -D_SGI_SOURCE -DMP_IOFUNC -I.
#CFLAGS=-ansi -pedantic -Wall -g -O2 -DMP_DEBUG=1 -I.
CFLAGS = -O -I.

##
## Define LIBS to include any libraries you need to link against.
## If NO_TABLE is define, LIBS should include '-lm' or whatever is
## necessary to bring in the math library.  Otherwise, it can be
## left alone, unless your system has other peculiar requirements.
##
LIBS=#-lmalloc#-lefence#-lm

## 
## Define RANLIB to be the library header randomizer; you might not
## need this on some systems (just set it to 'echo' on these systems,
## such as IRIX)
##
RANLIB=echo

##
## This is the version string used for the documentation and 
## building the distribution tarball.  Don't mess with it unless
## you are releasing a new version
VERS=1.7p6

## ----------------------------------------------------------------------
## You probably don't need to change anything below this line...
##

##
## This is the list of source files that need to be packed into
## the distribution file
SRCS=   mpi.c mpprime.c mplogic.c mpi-test.c primes.c tests/ \
	utils/gcd.c utils/invmod.c utils/lap.c \
	utils/ptab.pl utils/sieve.c utils/isprime.c\
	utils/dec2hex.c utils/hex2dec.c utils/bbs_rand.c \
	utils/bbsrand.c utils/prng.c utils/primegen.c \
	utils/basecvt.c utils/makeprime.c\
	utils/fact.c utils/exptmod.c utils/pi.c utils/metime.c \
	utils/mpi.h utils/mpprime.h mulsqr.c karatsuba.c \
	make-test-arrays test-arrays.txt all-tests make-logtab \
	types.pl stats timetest multest

## These are the header files that go into the distribution file
HDRS=mpi.h mpi-config.h utils/mpi.h utils/mpi-config.h mpprime.h \
	mplogic.h utils/bbs_rand.h tests/mpi.h tests/mpprime.h

## These are the documentation files that go into the distribution file
DOCS=README doc \
	utils/README utils/PRIMES 

## This is the list of tools built by 'make tools'
TOOLS=gcd invmod isprime lap dec2hex hex2dec primegen prng \
	basecvt fact exptmod pi makeprime

help:
	@ echo ""
	@ echo "The following targets can be built with this Makefile:"
	@ echo ""
	@ echo "libmpi       - arithmetic and prime testing library"
	@ echo "mpi-test     - test driver (requires MP_IOFUNC)"
	@ echo "tools        - command line tools"
	@ echo "doc          - manual pages for tools"
	@ echo "clean        - clean up objects and such"
	@ echo "distclean    - get ready for distribution"
	@ echo "dist         - distribution tarball"
	@ echo ""

.SUFFIXES: .c .o .i

.c.i:
	$(CC) $(CFLAGS) -E $< > $@

#.c.o: $*.h $*.c
#	$(CC) $(CFLAGS) -c $<

mpi.o: mpi-config.h logtab.h mpi.h mpi.c
	$(CC) $(CFLAGS) -c mpi.c

libmpi: mpi.o mpprime.o
	ar -cvr libmpi.a mpi.o mpprime.o
	$(RANLIB) libmpi.a

logtab.h: make-logtab
	$(PERL) make-logtab > logtab.h

mptest1: mpi.o tests/mptest-1.c
	$(CC) $(CFLAGS) -o mptest1 mpi.o tests/mptest-1.c $(LIBS)

mptest2: mpi.o tests/mptest-2.c
	$(CC) $(CFLAGS) -o mptest2 mpi.o tests/mptest-2.c $(LIBS)

mptest3: mpi.o tests/mptest-3.c
	$(CC) $(CFLAGS) -o mptest3 mpi.o tests/mptest-3.c $(LIBS)

mptest3a: mpprime.o mpi.o tests/mptest-3a.c
	$(CC) $(CFLAGS) -o mptest3a mpprime.o mpi.o tests/mptest-3a.c $(LIBS)

mptest4: mpi.o tests/mptest-4.c
	$(CC) $(CFLAGS) -o mptest4 mpi.o tests/mptest-4.c $(LIBS)

mptest4a: mpi.o mpprime.o tests/mptest-4a.c
	$(CC) $(CFLAGS) -o mptest4a mpi.o mpprime.o tests/mptest-4a.c $(LIBS)

{'fraction_non_alphanumeric': 0.12905265059152896, 'fraction_numerical': 0.012282127698004155, 'mean_word_length': 3.2989130434782608, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2539571', 'n_tokens_mistral': 4022, 'n_tokens_neox': 3863, 'n_words': 1445}