2 # Matt McCutchen's Big Integer Library
4 # Please see the project Web site at
5 # http://mysite.verizon.net/mccutchen/bigint/
6 # for more information and the latest version.
8 # December 23, 2004 development version
11 # We're now using array indexes instead of pointers.
12 # After having used pointers for faster speed, I decided
13 # that they detracted too much from the readability of
14 # the program and that a good optimizing compiler should
15 # be able to produce as efficient code.
17 # The implicit rules we need
21 g++ -c -O -Wall -Wextra -pedantic $<
24 library : NumberlikeArray.hh.tag BigUnsigned.o BigInteger.o BigUnsignedInABase.o BigIntegerUtils.o
26 # Extra `include' dependencies
27 BigUnsigned.hh.tag : NumberlikeArray.hh.tag
28 BigUnsigned.o : BigUnsigned.hh.tag
29 BigInteger.hh.tag : BigUnsigned.hh.tag
30 BigInteger.o : BigInteger.hh.tag
31 BigUnsignedInABase.hh.tag : BigUnsigned.hh.tag
32 BigUnsignedInABase.o : BigUnsignedInABase.hh.tag
33 BigIntegerUtils.hh.tag : BigInteger.hh.tag
34 BigIntegerUtils.o : BigIntegerUtils.hh.tag
37 sample : library sample.cc
38 g++ -osample *.o sample.cc
41 rm -f *.tag *.o sample
43 # The ``.tag'' mechanism allows for proper recompilation when a header file
44 # changes, considering that some header files may include others.
46 # If a header file X includes other header
47 # files Y and Z, we create a file X.tag that depends
48 # on X, Y.tag, and Z.tag. Other headers that include X should
51 # Suppose Y is subsequently changed. X doesn't get ``recompiled'',
52 # but anything that includes X should be recompiled. Well, Y.tag becomes
53 # out-of-date, so X.tag becomes out-of-date, so anything depending on X.tag
54 # (that is, anything including X) becomes out-of-date. Magic!
56 # In this system, the tag files are empty files used only for their
57 # timestamps. If one wished to use precompiled headers, one could use
58 # ``.gch'' files exactly how ``.tag'' files are used now, except that
59 # their contents would be meaningful.
61 # However, the same sort of ``deadly diamond'' problem that surfaces with
62 # multiple inheritance also applies to precompiled headers. The ``#ifndef''
63 # mechanism that prevents multiple inclusion doesn't work when headers are
64 # compiled independently in a hierarchical structure, since the second
65 # inclusion of a file won't even know there was a first inclusion. For
66 # this reason, I just use ``.tag''s.