home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / grafik / giflib11 / compile.me < prev    next >
Encoding:
Text File  |  1990-11-13  |  4.9 KB  |  109 lines

  1. The gif_lib library and utilities has been successfully compiled on the
  2. following platforms (you will need ansi c compiler for that):
  3.  
  4. 1. IBM-PC, using Turbo C version 2.0
  5. 2. Sun 3, with O.S. 3.5 and O.S. 4.0.3, using gcc (gnu c compiler).
  6. 3. HP workstations, running unix BSD4.3, using gcc (gnu c compiler).
  7. 4. SGI personal iris (iris4d) running IRIX 4.3, using its cc.
  8. 5. IBM R6000 running aix, using xlc (Ansi C compiler).
  9.  
  10. The first one (IBM-PC) was the main target of this package. The unix version
  11. compiles all the device independent utilities and more (such as gif to rle
  12. conversions, gif2X11 etc.). The IBM-PC compilation and testing is different
  13. from the unix ones, and are described in seperated section below.
  14.  
  15. Compile and test - IBM PC
  16. -------------------------
  17.  
  18. O.k. if you have TC 2.0 you are in good shape (otherwise you are on your own)
  19. and compilation will be simple:
  20.  
  21. 1. Goto to the makefiles in .\lib and .\util (called makefile.tc in both
  22.    places) and change the variable CC_LIBS to the exact place you have your
  23.    cc libraries. I use to put them in ram disk (disk f:) for fast access.
  24.    Make sure this is short variable or otherwise dos will complain about
  25.    lines too long (the stupid 128 chars per line), in linkage...
  26. 2. Few of the utilities on .\util needs the TC graphic libraries (the gif2xxxx
  27.    utilities). You need to create a library named graphbgi.lib that holds all
  28.    the BGI drivers and CHR fonts. You do so by a sequence similar to:
  29.  
  30.    a. bgiobj herc       (bgiobj.exe is on one of your TC 2.0 diskettes).
  31.    b. bgiobj egavga
  32.    c. bgiobj cga
  33.    d. bgiobj ibm8514
  34.    e. bgiobj pc3270
  35.    f. bgiobj goth
  36.    g. bgiobj litt
  37.    h. bgiobj sans
  38.    i. bgiobj trip
  39.  
  40.      This will convert all this drivers/fonts into .OBJ files, which can be all
  41.    linked to creat the library:
  42.  
  43.    tlib graphbgi.lib +herc.obj +egavga.obj ... +trip.obj, graphbgi.lst
  44.  
  45.      Copy this library to the same directory as specified by CC_LIBS in 1.
  46.  
  47. 3. Decide what directory you want the executables to br copied to and create
  48.    it if it is new. Goto .\util and set the DEST variable in the makefile 
  49.    (makefile.tc) to that directory.
  50. 4. Fire the compilation by executing make-ibm.bat
  51.  
  52.  
  53. To test most of the utilities reconfigure test-ibm.bat as follows:
  54. 1. make sure the new exectuables directory is in your path variable.
  55. 2. The default display program is gif2herc (in this package). If you have
  56.    another device such as VGA, you will want to replace it in test-ibm.bat
  57.    This utility should be able to read stdin for gif file. Set GIF_DISPLAY
  58.    in this batch file to its name.
  59. 3. Set the GIF_DIR variable in the batch file to the absolute path of
  60.    ./pic directory (hold some gif examples).
  61.  
  62. Run test-ibm.bat. You will want to print gif2herc.doc in ./doc so you will
  63. know how to use it (at list how to exit...).
  64.  
  65.  
  66. Compile and test - UNIX
  67. -----------------------
  68.  
  69. Compiling are testing under unix is simpler than the IBMPC:
  70.  
  71. 1. If you are to use the unix unzip utility to unpack this library, you
  72.    need to create 5 subdirectories (for some reason unzip does no create
  73.    the directories automatically) manually before invoking unzip:
  74.    BIN DOC LIB PIC UTIL (They all must be uppercase).
  75.    But I guess you are after this if you are reading this file now...
  76. 2. You need to convert all files (almost - gif2X11.* has X capitalized), from
  77.    MSDOS convension to unix one. This involves converting to lower case, and
  78.    stripping off ^Z from end of file and CR from CR/LF end of line.
  79.    You can do it manually, However the DOS2UNIX script will do %99 of the job.
  80.    It will convert ALL files found in subdirectories of the current working
  81.    directory from upper case to lower case, and strip the CR from the CR/LF
  82.    end of line used by MSDOS and ^Z from end of file. It does not check if
  83.    the file is binary or a text one, and it will DESTROY the gif images in
  84.    ./pic/*.gif, as it will strip off any CR or ^Z in them. You better move
  85.    the ./pic directory to someplace else before invoking DOS2UNIX and move it
  86.    back afterwords. Also you will probably need to issue 'chmod +x DOS2UNIX'
  87.    to make it executable.
  88.    MAKE SURE no other files but from this unpacked library, exists in the
  89.    current and sub directories, and execute DOS2UNIX.
  90. 3. Go to the ./lib and ./util directories (they should be lower case, after
  91.    dos2unix has been executed), and edit the unix makefiles (makefile.unx)
  92.    for the following:
  93.    a. Set CC to your c compiler name (usually cc but can be gcc - see in the
  94.       makefile.unx).
  95.    b. Select the right flags to the c compilers. Flags for SGI cc, and gcc are
  96.       provided.
  97. 4. Fire the compilation using make-unx. This will leave the executables in
  98.    ./bin.
  99.  
  100. Test the package by adding ./bin to your path and firing the 'test-unx' script.
  101. This assumes the display is X11, and the environment variable DISPLAY is set
  102. properly - uses gif2X11 as display utility.
  103.  
  104.  
  105.  
  106.  
  107. Gershon Elber
  108. gershon@cs.utah.edu
  109.