Math Processor Unit Library

libmpu – library of arithmetic functions for integer, real, and complex numbers of increased digit capacity

16 Commits   0 Branches   2 Tags
868b2b66 (kx 2024-12-20 16:11:07 +0300  1) 
868b2b66 (kx 2024-12-20 16:11:07 +0300  2) /*******************************************************************
868b2b66 (kx 2024-12-20 16:11:07 +0300  3) 
868b2b66 (kx 2024-12-20 16:11:07 +0300  4)   MPU Library Versioning:
868b2b66 (kx 2024-12-20 16:11:07 +0300  5)   ======================
868b2b66 (kx 2024-12-20 16:11:07 +0300  6) 
868b2b66 (kx 2024-12-20 16:11:07 +0300  7)   VERSION (major.minor.micro):
868b2b66 (kx 2024-12-20 16:11:07 +0300  8)   ---------------------------
868b2b66 (kx 2024-12-20 16:11:07 +0300  9)    - major - version changes when the library’s API was modified,
868b2b66 (kx 2024-12-20 16:11:07 +0300 10)    - minor - version changes when the library’s functionality was
868b2b66 (kx 2024-12-20 16:11:07 +0300 11)              modified in a backwards-compatible manner,
868b2b66 (kx 2024-12-20 16:11:07 +0300 12)    - micro - version changes when backwards-compatible bug fixes
868b2b66 (kx 2024-12-20 16:11:07 +0300 13)              or code changes were made.
868b2b66 (kx 2024-12-20 16:11:07 +0300 14)    NOTE:
868b2b66 (kx 2024-12-20 16:11:07 +0300 15)    ----
868b2b66 (kx 2024-12-20 16:11:07 +0300 16)     The VERSION value in this file should be equal to version
868b2b66 (kx 2024-12-20 16:11:07 +0300 17)     which declared in the configure.ac file on the following
868b2b66 (kx 2024-12-20 16:11:07 +0300 18)     function call:
868b2b66 (kx 2024-12-20 16:11:07 +0300 19) 
868b2b66 (kx 2024-12-20 16:11:07 +0300 20)        AC_INIT([MPU Library], [1.0.0], ...
868b2b66 (kx 2024-12-20 16:11:07 +0300 21) 
868b2b66 (kx 2024-12-20 16:11:07 +0300 22) 
868b2b66 (kx 2024-12-20 16:11:07 +0300 23)   LT_RELEASE (-release major.minor):
868b2b66 (kx 2024-12-20 16:11:07 +0300 24)   ---------------------------------
868b2b66 (kx 2024-12-20 16:11:07 +0300 25)    - major - version changes when the library’s API was changed,
868b2b66 (kx 2024-12-20 16:11:07 +0300 26)    - minor - version changes when backwards-compatible bug fixes
868b2b66 (kx 2024-12-20 16:11:07 +0300 27)              or code changes were made.
868b2b66 (kx 2024-12-20 16:11:07 +0300 28) 
868b2b66 (kx 2024-12-20 16:11:07 +0300 29)   LT_VERSION_INFO (-version-info current:revision:age):
868b2b66 (kx 2024-12-20 16:11:07 +0300 30)   ----------------------------------------------------
868b2b66 (kx 2024-12-20 16:11:07 +0300 31)    - current  - version changes when the library’s interface was
868b2b66 (kx 2024-12-20 16:11:07 +0300 32)                 modified (in this case the revision value is
868b2b66 (kx 2024-12-20 16:11:07 +0300 33)                 reset to zero),
868b2b66 (kx 2024-12-20 16:11:07 +0300 34)    - revision - version changes when the library’s source was
868b2b66 (kx 2024-12-20 16:11:07 +0300 35)                 changed,
868b2b66 (kx 2024-12-20 16:11:07 +0300 36)    - age      - version increases when one new function was added
868b2b66 (kx 2024-12-20 16:11:07 +0300 37)                 and decreases one old function was removed.
868b2b66 (kx 2024-12-20 16:11:07 +0300 38) 
868b2b66 (kx 2024-12-20 16:11:07 +0300 39) 
868b2b66 (kx 2024-12-20 16:11:07 +0300 40)    EXAMPLE 1:
868b2b66 (kx 2024-12-20 16:11:07 +0300 41)    ---------
868b2b66 (kx 2024-12-20 16:11:07 +0300 42)      1. Begin with the previous version information: 0:0:0
868b2b66 (kx 2024-12-20 16:11:07 +0300 43)      2. 0:0:0 becomes 0:1:0 (the library’s source was changed)
868b2b66 (kx 2024-12-20 16:11:07 +0300 44)      3. 0:1:0 becomes 1:0:0 (the library’s interface was modified)
868b2b66 (kx 2024-12-20 16:11:07 +0300 45)      4. 1:0:0 becomes 1:0:1 (one new function was added)
868b2b66 (kx 2024-12-20 16:11:07 +0300 46)      5. 1:0:1 becomes 1:0:0 (one old function was removed)
868b2b66 (kx 2024-12-20 16:11:07 +0300 47) 
868b2b66 (kx 2024-12-20 16:11:07 +0300 48)    EXAMPLE 2:
868b2b66 (kx 2024-12-20 16:11:07 +0300 49)    ---------
868b2b66 (kx 2024-12-20 16:11:07 +0300 50)     Let’s modify our example just a little to say that we’ve added
868b2b66 (kx 2024-12-20 16:11:07 +0300 51)     a new library interface function but haven’t removed anything.
868b2b66 (kx 2024-12-20 16:11:07 +0300 52)     Start again with the original version information of 0:0:0 and
868b2b66 (kx 2024-12-20 16:11:07 +0300 53)     follow the algorithm:
868b2b66 (kx 2024-12-20 16:11:07 +0300 54) 
868b2b66 (kx 2024-12-20 16:11:07 +0300 55)      1. Begin with the previous version information: 0:0:0
868b2b66 (kx 2024-12-20 16:11:07 +0300 56)      2. 0:0:0 becomes 0:1:0 (the library’s source was changed)
868b2b66 (kx 2024-12-20 16:11:07 +0300 57)      3. 0:1:0 becomes 1:0:0 (the library’s interface was modified)
868b2b66 (kx 2024-12-20 16:11:07 +0300 58)      4. 1:0:0 becomes 1:0:1 (one new function was added)
868b2b66 (kx 2024-12-20 16:11:07 +0300 59)      5. Not applicable (nothing was removed)
868b2b66 (kx 2024-12-20 16:11:07 +0300 60) 
868b2b66 (kx 2024-12-20 16:11:07 +0300 61)     This time, we end up with a Libtool version string of 1:0:1,
868b2b66 (kx 2024-12-20 16:11:07 +0300 62)     but the resulting Linux or Solaris shared-library filename is
868b2b66 (kx 2024-12-20 16:11:07 +0300 63)     libname.so.0.1.0. Consider for a moment what it means, in the
868b2b66 (kx 2024-12-20 16:11:07 +0300 64)     face of major, minor, and patch-level values, to have a nonzero
868b2b66 (kx 2024-12-20 16:11:07 +0300 65)     age value in the Libtool version string. An age value of one
868b2b66 (kx 2024-12-20 16:11:07 +0300 66)     (as in this case) means that we are effectively still supporting
868b2b66 (kx 2024-12-20 16:11:07 +0300 67)     a Linux major value of zero, because this new version of the
868b2b66 (kx 2024-12-20 16:11:07 +0300 68)     library is 100-percent backward compatible with the previous
868b2b66 (kx 2024-12-20 16:11:07 +0300 69)     version. The minor value in the shared-library filename has been
868b2b66 (kx 2024-12-20 16:11:07 +0300 70)     incremented from zero to one to indicate that this is, in fact,
868b2b66 (kx 2024-12-20 16:11:07 +0300 71)     an updated version of the soname, libname.so.0. The patch-level
868b2b66 (kx 2024-12-20 16:11:07 +0300 72)     value remains at zero because this value indicates a bug fix to
868b2b66 (kx 2024-12-20 16:11:07 +0300 73)     a particular minor revision of an soname.
868b2b66 (kx 2024-12-20 16:11:07 +0300 74) 
868b2b66 (kx 2024-12-20 16:11:07 +0300 75) 
868b2b66 (kx 2024-12-20 16:11:07 +0300 76)    Libtool creates .so suffix for Linux by following manner:
868b2b66 (kx 2024-12-20 16:11:07 +0300 77) 
868b2b66 (kx 2024-12-20 16:11:07 +0300 78)      major=.`expr $current - $age`
868b2b66 (kx 2024-12-20 16:11:07 +0300 79)      versuffix="$major.$age.$revision"
868b2b66 (kx 2024-12-20 16:11:07 +0300 80) 
868b2b66 (kx 2024-12-20 16:11:07 +0300 81)    for Cygwin:
868b2b66 (kx 2024-12-20 16:11:07 +0300 82) 
868b2b66 (kx 2024-12-20 16:11:07 +0300 83)      major=`expr $current - $age`
868b2b66 (kx 2024-12-20 16:11:07 +0300 84)      versuffix="-$major"
868b2b66 (kx 2024-12-20 16:11:07 +0300 85) 
868b2b66 (kx 2024-12-20 16:11:07 +0300 86)    The declaration in the Makefile.am has to be like this:
868b2b66 (kx 2024-12-20 16:11:07 +0300 87) 
868b2b66 (kx 2024-12-20 16:11:07 +0300 88)      lib_LTLIBRARIES = libtest-1.0.la
868b2b66 (kx 2024-12-20 16:11:07 +0300 89)      libtest_1_0_la_LDFLAGS = -version-info 0:0:0
868b2b66 (kx 2024-12-20 16:11:07 +0300 90) 
868b2b66 (kx 2024-12-20 16:11:07 +0300 91)    where 1.0 is a release number of the test library.
868b2b66 (kx 2024-12-20 16:11:07 +0300 92) 
868b2b66 (kx 2024-12-20 16:11:07 +0300 93)  *******************************************************************/