home *** CD-ROM | disk | FTP | other *** search
/ Peanuts NeXT Software Archives / Peanuts-2.iso / Developer / languages / c / djgpp.2.0.README < prev    next >
Encoding:
Text File  |  1996-03-25  |  7.0 KB  |  211 lines

  1. This package includes djgpp Version 2.00
  2.  for NeXT, a cross compiler based on gcc 2.7.2, for the C, C++ and Objective C languages.
  3.  
  4. Djgpp is a DOS port of gcc,  produces executables that run under DOS/DPMI  extender (I don't know what this is, but my program runs on my colleage's PC).
  5.  
  6. This tool allows to port very easely standard C programs (without graphics) from a NeXT to PCs without shrinking sources filenames, CR/LF filtering, and $.
  7.  
  8. It should work also with C++ and Objective C programs (not tested !)
  9.  
  10.  
  11. To use it :
  12.     gcc-dos hello.c -o hello.exe
  13. or
  14.     g++-dos hello.cc -o hello.exe
  15.  
  16. In makefiles, change the CC macro : CC = gcc-dos
  17. type make program and a "program.exe" file wil be automatically generated.
  18.  
  19. to install it (in /usr/local directories) :
  20.  
  21. gtar xfz x_gcc-dos_272.b.N.tar.gz
  22.  
  23.  
  24.  
  25. This software is distributed under the FSF license as a public  service.
  26. The author offer no warranty or guarantee of any type.
  27. No modification of the original sources were made.
  28.  
  29. ------------------------------------------------
  30. Bruno.Bienfait@EROS.CCC.Uni-Erlangen.de
  31. http://schiele.organik.uni-erlangen.de/Bruno_Bienfait/home.html
  32. http://schiele.organik.uni-erlangen.de/Bruno_Bienfait/HotPostscript.html
  33. ------------------------------------------------
  34.  
  35.  
  36.  
  37. -------------------------------------------------------------------------------
  38. DJGPP v2.0 is a free environment for developing 32-bit protected mode
  39.  
  40. software in C/C++ under MS-DOS.
  41.  
  42.  
  43.  
  44. Status and other information (online docs, FAQ, mail archives) are
  45.  
  46. made available through the djgpp web pages at http://www.delorie.com/.
  47.  
  48. Discussion of DJGPP and questions about its usage or features are
  49.  
  50. through the djgpp news group (post to comp.os.msdos.djgpp) and djgpp
  51.  
  52. mailing list (send your messages to <djgpp@delorie.com>, subscribe
  53.  
  54. through <listserv@delorie.com>).  Look on the web page for information
  55.  
  56. on the latest versions of various DJGPP packages.
  57.  
  58.  
  59.  
  60. Version information is in manifest/*.ver within each zip.  Contents
  61.  
  62. are in manifest/*.mft in each zip.
  63.  
  64.  
  65.  
  66. A different, more complete (and longer) tutorial on how to get started
  67.  
  68. with DJGPP was written by An <avly@remus.rutgers.edu> and is available
  69.  
  70. by anonymous ftp from x2ftp.oulu.fi in the
  71.  
  72. /pub/msdos/programming/djgpp2 directory, filename djtut-bm.zip.  You
  73.  
  74. can also read it on-line by pointing your Web browser to this URL:
  75.  
  76.  
  77.  
  78.     http://remus.rutgers.edu/~avly/djgpp.html
  79.  
  80.  
  81.  
  82.  
  83. Status and other information (online docs, FAQ, mail archives) are
  84.  
  85. made available through the djgpp web pages at http://www.delorie.com/.
  86.  
  87. Discussion of DJGPP and questions about its usage or features are
  88.  
  89. through the djgpp news group (post to comp.os.msdos.djgpp) and djgpp
  90.  
  91. mailing list (send your messages to <djgpp@delorie.com>, subscribe
  92.  
  93. through <listserv@delorie.com>).  Look on the web page for information
  94.  
  95. on the latest versions of various DJGPP packages.
  96. -------------------------------------------------------------------------------
  97. -------------------------------------------------------------------------------
  98. -------------------------------------------------------------------------------
  99.  
  100. -------------------------------------------------------------------------------
  101.   approximative build history (the basic procedure is described in the DJGPP FAQ ).
  102. -------------------------------------------------------------------------------
  103.  
  104. Note : you don't have to modify the original sources
  105.  
  106.     you need :
  107.         gcc 2.7.2
  108.         binutils 2.5.2  (does 2.6 does not assemble correctly ?)
  109.         The librairies from DJGPP v2
  110.         The include files from DJGPP v2 
  111. ---------------------
  112.  
  113. mkdir DJGPP
  114. cd DJGPP
  115.  
  116. -------------------
  117. #extract gnu binutils with gnutar
  118. tar xfz ../binutils-2.6.tar.gz
  119.  
  120.  
  121. cd binutils-2.6
  122. configure  --target=i386-coff-go32
  123.  
  124. make CFLAGS=-O
  125.  
  126.     mkdirs /usr/local/i386-go32-msdos/bin #on a NeXT
  127.     mkdir -p /usr/local/i386-go32-msdos/bin #on a sun 
  128.  
  129.  
  130.      cd ../cd binutils-2.6
  131.      cd binutils
  132.      cp ar c++filt objcopy objdump size /usr/local/i386-go32-msdos/bin
  133.      cp nm.new /usr/local/i386-go32-msdos/bin/nm
  134.      cp strip.new /usr/local/i386-go32-msdos/bin/strip
  135.      
  136.      cd ../gas
  137.      cp as.new /usr/local/i386-go32-msdos/bin/as
  138.      cp gasp.new /usr/local/i386-go32-msdos/bin/gasp
  139.      
  140.      cd ../ld
  141.      cp ld.new /usr/local/i386-go32-msdos/bin/ld
  142. #The assembler of binutils 2.6 does not work correctly
  143.     #installing bin-utils 2.5
  144.         make CC=gcc "CFLAGS=STDC_HEADERS" #"CFLAGS=STDC_HEADERS" is for next
  145.         cd gas
  146.         cp as.new /usr/local/i386-go32-msdos/bin/as
  147.          cp gasp.new /usr/local/i386-go32-msdos/bin/gasp
  148.  
  149. -------------------
  150. # PART 2 the compiler gcc
  151.  
  152. cd ..
  153. tar xfz ../gcc-2.7.2.tar.gz
  154. cd gcc-2.7.2
  155. configure --target=i386-go32-msdos
  156. make CFLAGS=-O
  157.  cc1  #would be better on Unix to use CC=gcc
  158. make CFLAGS=-O
  159.  cc1obj #ObjC
  160. make CFLAGS=-O
  161.  cc1plus
  162. make CFLAGS=-O
  163.  cccp
  164. make CFLAGS=-O
  165.  xgcc
  166. make CFLAGS=-O g++-cross
  167.  
  168.  
  169.  
  170. ll cc*
  171. -rwxrwxr-x  1 beeped   1257616 Mar 21 19:32 cc1*
  172. -rwxrwxr-x  1 beeped   1335308 Mar 21 19:34 cc1obj*
  173. -rwxrwxr-x  1 beeped   1681552 Mar 21 20:03 cc1plus*
  174. -rwxrwxr-x  2 beeped    121084 Mar 21 19:07 cccp*
  175. -rw-rw-r--  1 beeped     15823 Mar 30  1995 cccp.1
  176. -r--r--r--  1 beeped    284835 Oct 26 15:07 cccp.c
  177. -rw-rw-r--  1 beeped    107800 Mar 21 19:06 cccp.o
  178.  
  179.  
  180.         
  181. #installing gcc-dos
  182.     cd ../../gcc-2.7.2
  183.      cp xgcc /usr/local/bin/gcc-dos
  184.      cp cc1 /usr/local/i386-go32-msdos/bin/cc1
  185.      cp cccp /usr/local/i386-go32-msdos/bin/cpp
  186.     cp cc1plus cc1obj /usr/local/i386-go32-msdos/bin/
  187. #g++
  188.     cd gcc-2.7.2
  189.     cp g++-cross /usr/local/bin/g++-dos 
  190.     cd /usr/local/bin
  191.     ln -s gcc-dos i386-go32-msdos-gcc
  192.     
  193. # Installing the librairies and the includes
  194. #
  195.     mkdir /usr/local/djgpp
  196.     mkdirs  /usr/local/lib/gcc-lib/i386-go32-msdos/2.7.2
  197.         
  198.     cp -r /private/tmp/O_djdev200/lib /usr/local/djgpp/
  199.     
  200.     
  201.     #Installing libg++ and libobc
  202.     cp /private/tmp/O_lgp271b/lib/* /usr/local/djgpp/lib
  203.  
  204.     cp -r /private/tmp/O_djdev200/include /usr/local/djgpp/
  205.     cd /usr/local/djgpp/lib ; ln -s libgpp.a libstdc++.a
  206.     cd /usr/local/lib/gcc-lib/i386-go32-msdos/2.7.2
  207.  
  208.     #the objC include files
  209.     cp -r /usr/local/lib/gcc-lib/m68k-next-nextstep3/2.7.2/include/objc /usr/local/djgpp/include
  210.     
  211.     #install
  212.       ln -s /usr/local/djgpp/include .
  213.      ln -s /usr/local/djgpp/lib/* .
  214.      chmod a+r /usr/local/djgpp/lib/*
  215.      
  216.      
  217.     cd include
  218.     dos2unix * */* # my perl script
  219.  
  220.     dos2unix lib/djgpp.lnk
  221.     Change lib/djgpp.lnk to use "coff-i386" instead of "coff-go32" 
  222.     chmod a+r * */* */*/* */*/*/*
  223.     chmod a+x *
  224.     cd include
  225.     chmod a+x debug sys libc libm machine inlines netinet
  226.     cd ..
  227. # Build `stubify' and install it in `/usr/local/i386-go32-msdos/bin'.
  228.     
  229.     found the source in djcrx200.zip
  230.     cd /LocalApps/tools/FTP/DJGPP/stub
  231.     55  ls
  232.     56  dos2unix *
  233.     57  cc -O stubify.c -o stubify
  234.     58  stubify
  235.  
  236.      #Install :
  237.         cp /LocalApps/tools/FTP/DJGPP/stub/stubify /usr/local/i386-go32-msdos/bin/
  238.         
  239.         
  240.         
  241.         
  242. #Making an archive
  243. cp README /usr/local/djgpp/README
  244. gtar cfzP x_gcc-dos_272.b.N.tar.gz  /usr/local/i386-go32-msdos /usr/local/djgpp /usr/local/bin/gcc-dos /usr/local/bin/g++-dos /usr/local/lib/gcc-lib/i386-go32-msdos/2.7.2 /usr/local/bin/g++-dos/i386-go32-msdos-gcc
  245.