home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / e / emxdev8f.zip / BUILD.DOC < prev    next >
Text File  |  1993-01-03  |  7KB  |  273 lines

  1. ===============================================================================
  2. build.doc         emx 0.8f     BUILDING GCC etc.                    03-Jan-1993
  3. ===============================================================================
  4.  
  5. Building GCC, GDB and utilities
  6. ===============================
  7.  
  8. Note: Some of the makefiles currently assume that a FAT file system is
  9. used.  (NMAKE doesn't support long file names.)  GCC can also be built
  10. on an HPFS partition (the file names are truncated by gcc-emx.cmd).
  11.  
  12. The makefiles have been created for NMAKE.  dmake and GNU make work as
  13. well.  Use the initialization file /emx/etc/dmake.ini for dmake.
  14.  
  15. Set the following environment variables (insert the correct drive
  16. letters):
  17.  
  18.   set emxopt=-t                     Truncate file names to 8.3
  19.   set emx=c:\emx\emx.exe            Speed up locating emx.exe for MS-DOS
  20.   path c:\emx\bin;%path%            Search c:\emx\bin for programs
  21.  
  22. You need the patched sources.  omake is a batch file, contained in
  23. /emx/bin.  It calls NMAKE and redirects output to the file out.  Make
  24. sure that /emx/bin is near the beginning of your PATH.
  25.  
  26. You can apply the patches to the sources yourself, see the batch files
  27. gcc-emx.cmd, gdb-emx.cmd, bin-emx.cmd, gas-emx.cmd and info-emx.cmd in
  28. /emx/gnu.  Some of these batch files require sed.  These batch files
  29. have not been tested on FAT drives.  gdb-del1.cmd can be used to
  30. delete files of the GDB distribution which are not required.
  31.  
  32.  
  33. Preliminary tasks
  34. -----------------
  35.  
  36. Create the directories /emx/new and /emx/build:
  37.  
  38.   md \emx\new
  39.   md \emx\build
  40.  
  41.  
  42. Building GCC
  43. ------------
  44.  
  45.   Edit makeexe.cmd and dostage1.cmd to contain the correct path for
  46.   gcc.exe, cpp.exe, cc1.exe, as.exe, ld.exe and emxl.exe.  The timings
  47.   given are for a 33MHz 386DX.
  48.  
  49.   cd \emx\gnu\gcc-2.3
  50.   dostage1                            (38 min, using GCC 2.2.2)
  51.   makeexe
  52.   md stage1
  53.   movstage stage1
  54.   dostage2                            (90 min)
  55.   makeexe
  56.   md stage2
  57.   movstage stage2
  58.   dostage3                            (75 min)
  59.  
  60.   The files common to . and stage2 must be identical.
  61.  
  62.   makebin gcc cpp cc1 cc1plus cc1obj
  63.  
  64.   To recompile GCC without going through two or three stages, use
  65.   compile.cmd.
  66.  
  67.  
  68. Building GAS
  69. ------------
  70.  
  71.   cd \emx\gnu\gas-1.38
  72.   omake
  73.   makebin as
  74.  
  75.  
  76. Building GDB
  77. ------------
  78.  
  79.   You need sed for compiling GDB.
  80.  
  81.   cd \emx\gnu\readline
  82.   omake
  83.   cd \emx\gnu\bfd
  84.   omake
  85.   cd \emx\gnu\libibert
  86.   omake
  87.   cd \emx\gnu\gdb-4.7
  88.   omake
  89.   makebin gdb
  90.  
  91.  
  92. Building the texinfo utilities
  93. ------------------------------
  94.  
  95.   cd \emx\gnu\texinfo
  96.   omake
  97.   makebin info makeinfo texindex
  98.  
  99.  
  100. Building the binary utilities (ld, ar, size, strip, nm, objdump)
  101. ----------------------------------------------------------------
  102.  
  103.   cd \emx\gnu\binutils
  104.   omake
  105.   makebin ld ar size strip nm objdump
  106.  
  107. The makebin batch file converts a.out files to .exe files, using
  108. appropriate options.  The .exe files are put into the directory
  109. /emx/new.  To convert all a.out files (gcc, cpp, cc1, cc1plus, cc1obj,
  110. as, gdb, ld, ar, strip, size, nm, objdump), call
  111.  
  112.   makebin all
  113.  
  114. After testing, you can move the .exe files from /emx/new to /emx/bin.
  115.  
  116.  
  117. Building genclass
  118. -----------------
  119.  
  120.   cd \emx\gnu\libg++\genclass
  121.   dmake
  122.  
  123.  
  124. Building the libraries
  125. ======================
  126.  
  127. Building libc.a (the emx C library)
  128. -----------------------------------
  129.  
  130.   cd \emx\lib
  131.   omake
  132.  
  133. This builds the following files in the directory /emx/lib:
  134.  
  135.   crt0.o        startup code
  136.   dll0.o        startup code for dynamic link libraries
  137.   libc.a        the emx C library
  138.   libgcc.a      compiler helper functions
  139.   libm.a        math library (empty, all the math functions are in libc.a)
  140.   libos2.a      import library for OS/2 API
  141.   libg.a        dummy library (for -g)
  142.  
  143.  
  144. Building libgraph.a (the emx graphics library)
  145. ----------------------------------------------
  146.  
  147.   cd \emx\lib
  148.   omake libgraph
  149.  
  150. This builds /emx/lib/libgraph.a.
  151.  
  152.  
  153. Building libvideo.a (the emx video library)
  154. ----------------------------------------------
  155.  
  156.   cd \emx\lib
  157.   omake libvideo
  158.  
  159. This builds /emx/lib/libvideo.a.
  160.  
  161.  
  162. Building libtermc.a (the GNU termcap library)
  163. ---------------------------------------------
  164.  
  165.   cd \emx\gnu\termcap
  166.   omake
  167.  
  168. This builds /emx/lib/libtermc.a.  Patches for termcap are not included
  169. -- I can't remember where I took the termcap sources from.  I think
  170. they're from the GNUish MS-DOS project or from Kai Uwe Rommel's OS/2
  171. ports of GNU programs.
  172.  
  173.  
  174. Building libgpp.a and libstdio.a (the GNU C++ library)
  175. ------------------------------------------------------
  176.  
  177. For building libgpp.a and libstdio.a you need OS/2 2.0.  The library
  178. sources must be installed on an HPFS drive.  If you've applied
  179. hpfs.cmd in /emx/include.cpp, you have to run fat.cmd to rename the
  180. include files to 8.3 names before building libgpp.a and libstdio.a.
  181. Additionally, you need the following utilities:
  182.  
  183.   dmake                         (tested with dmake 3.8)
  184.   sh                            (tested with Data Logic sh 1.6.4)
  185.  
  186. Both programs are usually available in OS/2 archives.  The -t option
  187. must not be set in the EMXOPT environment variable.
  188.  
  189.   cd \emx\gnu\libg++
  190.   dmake
  191.   copy libgpp.a \emx\lib
  192.   copy libstdio.a \emx\lib
  193.  
  194.  
  195. Building libobjc.a (runtime library for the Objective C language)
  196. -----------------------------------------------------------------
  197.  
  198.   cd \emx\gnu\gcc-2.3\objc
  199.   omake
  200.   copy libobjc.a \emx\lib
  201.  
  202.  
  203. Building libcurse.a (the BSD curses library)
  204. --------------------------------------------
  205.  
  206.   cd \emx\bsd\curses
  207.   omake
  208.   copy libcurse.a \emx\lib
  209.  
  210. This builds /emx/lib/libcurse.a.
  211.  
  212.  
  213. Building libbsd.a (partial BSD C library)
  214. -----------------------------------------
  215.  
  216.   cd \emx\bsd\libc
  217.   omake
  218.   copy libbsd.a \emx\lib
  219.  
  220. This builds /emx/lib/libbsd.a.
  221.  
  222.  
  223. Building the OMF libraries (.lib files)
  224. ---------------------------------------
  225.  
  226. To create libsys.lib, type
  227.  
  228.   cd \emx\lib
  229.   omake libsys
  230.  
  231. Note that you need MASM 6.0 to build thunk.obj.  If you don't have
  232. MASM 6.0, you should avoid deleting thunk.obj.
  233.  
  234. To create the OMF libraries (.lib) from the a.out libraries (.a),
  235. enter
  236.  
  237.   cd \emx\lib
  238.   omake omflib
  239.  
  240. This builds the following files in the directory /emx/lib:
  241.  
  242.   dll0.obj      startup code for dynamic link libraries
  243.   libbsd.lib    Partial BSD C library
  244.   libc.lib      the emx C library
  245.   libcurse.lib  BSD curses library
  246.   libg.lib      dummy library (for -g)
  247.   libgcc.lib    compiler helper functions
  248.   libgpp.lib    GNU C++ library
  249.   libgraph.lib  the emx graphics library
  250.   libm.lib      math library (empty, all the math functions are in libc.lib)
  251.   libos2.lib    import library for OS/2 API
  252.   libstdio.lib  GNU C++ library
  253.   libtermc.lib  GNU termcap library
  254.   libvideo.lib  the emx video library
  255.  
  256.  
  257. Building emxlibc.dll
  258. --------------------
  259.  
  260.   cd \emx\lib
  261.   omake mt
  262.  
  263. This builds the following files:
  264.  
  265.   /emx/dll/emxlibc.dll    the dynamic link library
  266.   /emx/lib/libmt.a        import library
  267.   /emx/lib/libmt.lib      import library
  268.  
  269. If emxlibc.dll is currently in use, copying to /emx/dll fails and
  270. you'll find emxlibc.dll in /emx/lib/mt.
  271.  
  272. ---------------------------- END OF BUILD.DOC -------------------------------
  273.