README 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. README file for compiling Meschach with Think C
  2. ===============================================
  3. Received 8th June, 1995 from Brent Boyer (boyer@jumpjibe.stanford.edu).
  4. I have modified this file to make the Meschach routines work on a
  5. Macintosh with THINK C 7.0.4. I realize that THINK C is now on
  6. version 8.x and that Metrowerk's CodeWarrior is a competetive
  7. development environment, but 7.0.4 is what I have available. My
  8. system is a Quadra 650 running MacOS 7.5.1. The compile options
  9. described below should work for any 68K Mac with a floating point
  10. unit; they probably have to be modified for Power Macs.
  11. Below I describe the steps I took to build a library project for all
  12. the Meschach routines.
  13. Step 1)
  14. _________
  15. First create an appropriate version of THINK's ANSI library.
  16. What I did was copy their project "ANSI" to one I called
  17. "ANSI(020, 881, 4b ints)". I then selected these compiler ("THINK
  18. C...") options before bringing the project up to date:
  19. -- first, under "Language Settings"
  20. 1) choose "Factory Settings"
  21. 2) also change "Infer prototypes" to "Require prototypes"
  22. (as a former Pascal programmer, I curse the
  23. person who introduced infered prototypes!)
  24. (Note: you _cannot_ choose "ANSI Settings"; if
  25. you do, then the compilation of the ANSI
  26. project will fail! Talk to the people at
  27. Symantec about this one ...)
  28. -- next, under "Compiler Settings"
  29. 1) turn "Generate 68020 instructions" ON
  30. 2) turn "Generate 68881 instructions" ON
  31. 3) turn "4-byte ints" ON
  32. (so int == long int <==> 32 bits)
  33. 4) make sure that "8-byte doubles" turned OFF
  34. (so double == long double)
  35. 5) turn "Native floating-point format" ON
  36. (The other options probably do not matter either way)
  37. (Note: 2) and 5) ==> type double will be the 96 bit
  38. MC68881 floating point extended precision type;
  39. these options give the best speed and good accuracy too)
  40. -- optionally, under "Code Optimization"
  41. 1) turn "Use Global Optimizer" ON
  42. Step 2)
  43. _________
  44. Create a project ("Meschach") containing all the Meschach
  45. routines that can serve as a library. After opening a new project
  46. ("ANSI Project" type) to which you added all the source code files,
  47. select these compiler ("THINK C...") options before bringing the
  48. project up to date:
  49. -- first, under "Language Settings"
  50. 1) choose "ANSI Settings"
  51. (tragically, will have to leave "Infer prototypes" on)
  52. -- next, under "Compiler Settings", make the same choices as
  53. when compiled "ANSI(020, 881, 4b ints)"
  54. 1) turn "Generate 68020 instructions" ON
  55. 2) turn "Generate 68881 instructions" ON
  56. 3) turn "4-byte ints" ON (so int == long int <==> 32 bits)
  57. 4) make sure that "8-byte doubles" turned OFF
  58. (so double == long double)
  59. 5) turn "Native floating-point format" ON
  60. (Note: the THINK C compiler, quite correctly, insists
  61. that pointer types agree exactly.
  62. This means that the function "px_sign" in the file
  63. "pxop.c" will not compile unless the line
  64. numtransp = myqsort(px2->pe, px2->size);
  65. is replaced with
  66. numtransp = myqsort( (int *) px2->pe, px2->size );
  67. since the field "pe" is a pointer to type u_int, not
  68. an int, which the function "myqsort" expects.
  69. I made this change.)
  70. [D.Stewart: This change will be made to the next
  71. distribution of Meschach.]
  72. You should then be able to simply add this project to any of your own
  73. projects so that it functions as a library. The original "machine.h"
  74. file may be found in the folder "origStuff" along with the *.shar
  75. files.
  76. -- Brent Boyer
  77. 6/7/95
  78. [Note: The file MACHINES/ThinkC/totalMacSetup.hqx has been moved to the
  79. top directory, and is not automatically part of the main distribution.
  80. The reason for this is the amount of space it takes up.
  81. -- David Stewart, 8th Sept., 1995.]