home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff384.lzh / NorthC / Example1.LZH / cRender / Makefile.doc < prev    next >
Makefile  |  1990-08-30  |  2KB  |  59 lines

  1.   (c) 1990 S.Hawtin.
  2.   Permission is granted to copy this file provided
  3.    1) It is not used for commercial gain
  4.    2) This notice is included in all copies
  5.    3) Altered copies are marked as such
  6.  
  7.   No liability is accepted for the contents of the file.
  8.  
  9.   This file describes what the components of the "Makefile" mean.  The 
  10. "Makefile" describes how to construct the "CRender" program, it is used by 
  11. a tool called "make" to build the program whenever you edit one of the 
  12. source files.
  13.  
  14.   The "Makefile" is split into individual items, each item describes a 
  15. file, so the item that looks like
  16.  
  17.     CRender: render.o aif.o
  18.             blink with $*.blink
  19.  
  20. tells "make" that the "CRender" file needs to be remade each time 
  21. "render.o" or "aif.o" is changed, and that you can construct the file with 
  22. the command "blink with $*.blink".  The "$*" sequence is automatically 
  23. translated by "make" into "CRender" so the actual command that will be 
  24. used is
  25.  
  26.     blink with CRender.blink
  27.  
  28. if the "CRender.blink" file has not been created you can create it with 
  29. the command
  30.  
  31.     make $*.blink
  32.  
  33. issued to the CLI.  The next part of the "Makefile" tells "make" about the 
  34. ".o" files
  35.  
  36.     render.o: 3D.h
  37.  
  38.     aif.o: 3D.h menustrip.h
  39.  
  40. these items just tell "make" to recompile "render.c" each time "3D.h" is 
  41. changed, and "aif.c" each time "3D.h" or "menustrip.h" is changed.  We do 
  42. not need to give any more information because "make" knows how to normally 
  43. compile ".c" files into ".o" files.
  44.  
  45.   The final item in the file tells make how to construct ".o" files from 
  46. ".c" files
  47.  
  48.     .c.o:
  49.             NorthC -Ot:$*.s $*.c
  50.             top t:$*.s t:$*.s1
  51.             a68k -g -q -O$*.o t:$*.s1
  52.             delete t:$*.s t:$*.s1
  53.  
  54. again the "$*" will be replaced by the root filename.  The reson for 
  55. adding this is that we want the system to optimise the code that the 
  56. compiler has produced.
  57.  
  58.   For more detail of how "make" works see the documenation in the ":bin" 
  59. directory on the "NorthC" disk.