home *** CD-ROM | disk | FTP | other *** search
/ World of Graphics / WOGRAPH.BIN / 438.MAKEFILE < prev    next >
Text File  |  1993-03-05  |  4KB  |  149 lines

  1. #############################################################################
  2. #
  3. #                   Copyright (C) 1993 Kendall Bennett.
  4. #                           All rights reserved.
  5. #
  6. # Descripton:   Makefile for the SuperVGA test library.
  7. #               MSDOS version for Borland C++ 3.0
  8. #
  9. # $Id: makefile 1.2 1993/03/03 10:24:27 kjb Exp $
  10. #
  11. #############################################################################
  12.  
  13. # Turn on autodependency checking
  14.  
  15. .AUTODEPEND
  16.  
  17. # Let make know where to find all the appropriate files
  18.  
  19. .PATH.asm       = .
  20. .PATH.lib       = .
  21. .PATH.obj       = .
  22. .PATH.exe       = .
  23.  
  24. CC              = bcc               # Name of C compiler
  25. ASM             = tasm              # Name of assembler
  26. LINK            = tlink             # Name of linker
  27. LIB             = tlib              # Name of librarian
  28. LIB_FLAGS       = /C /E
  29.  
  30. !if $d(debug)
  31. CC_DOPT         = -v                # Turn on debugging for C compiler
  32. ASM_DOPT        = /ZI               # Turn on debugging for assembler
  33. LINK_OPT        = /v /m /s          # Turn on debugging for linker, and mapfile
  34. DEBUG           = -Ddebug
  35. !endif
  36.  
  37. # We must assemble the test programs in the large memory model
  38.  
  39. MODEL           = l
  40. ASM_MODEL       = /d__LARGE__
  41.  
  42. ASM_FLAGS       = /MX /m /i$(.PATH.asm) $(ASM_DOPT) $(ASM_MODEL)
  43. CC_FLAGS        = -m$(MODEL) $(CC_DOPT)
  44.  
  45. # Implicit rules to make the object files for the test code
  46.  
  47. .c.obj:
  48.     $(CC) $(CC_FLAGS) -c {$< }
  49.  
  50. .asm.obj:
  51.     $(ASM) $(ASM_FLAGS) $<, $(.PATH.obj)\$&
  52.  
  53. # Object files required to build the libraries
  54.  
  55. OBJECTS         = modes.obj names.obj common.obj getopt.obj detectgr.obj cpu.obj
  56. SVGA16OBJ       = svga16c.obj $(OBJECTS) svga16.obj
  57. SVGA256OBJ      = svga256c.obj $(OBJECTS) svga256.obj
  58. SVGA32KOBJ      = svga32kc.obj $(OBJECTS) svga32k.obj
  59. SVGA16MOBJ      = svga16mc.obj $(OBJECTS) svga16m.obj
  60. UVESAOBJ        = univesa.obj uvesa.obj $(OBJECTS)
  61.  
  62. all: test16.exe test256.exe test32k.exe test16m.exe univesa.exe
  63.  
  64. libs: svga16.lib svga256.lib svga32k.lib svga16m.lib
  65.  
  66. test16.exe: test16.obj svga16.lib
  67.     $(CC) $(CC_FLAGS) -e$< test16.obj svga16.lib
  68.  
  69. test256.exe: test256.obj svga256.lib
  70.     $(CC) $(CC_FLAGS) -e$< test256.obj svga256.lib
  71.  
  72. test32k.exe: test32k.obj svga32k.lib
  73.     $(CC) $(CC_FLAGS) -e$< test32k.obj svga32k.lib
  74.  
  75. test16m.exe: test16m.obj svga16m.lib
  76.     $(CC) $(CC_FLAGS) -e$< test16m.obj svga16m.lib
  77.  
  78. univesa.exe: $(UVESAOBJ)
  79.     $(LINK) $(LINK_OPT) @univesa.rsp
  80.  
  81. # Targets to make each of the individual library files
  82.  
  83. svga16.lib: $(SVGA16OBJ)
  84.     buildrsp &&!|
  85.     $(SVGA16OBJ)
  86. !   > temp.rsp
  87.     $(LIB) $(LIB_FLAGS) $< @temp.rsp
  88.     del temp.rsp
  89.  
  90. svga256.lib: $(SVGA256OBJ)
  91.     buildrsp &&!|
  92.     $(SVGA256OBJ)
  93. !   > temp.rsp
  94.     $(LIB) $(LIB_FLAGS) $< @temp.rsp
  95.     del temp.rsp
  96.  
  97. svga32k.lib: $(SVGA32KOBJ)
  98.     buildrsp &&!|
  99.     $(SVGA32KOBJ)
  100. !   > temp.rsp
  101.     $(LIB) $(LIB_FLAGS) $< @temp.rsp
  102.     del temp.rsp
  103.  
  104. svga16m.lib: $(SVGA16MOBJ)
  105.     buildrsp &&!|
  106.     $(SVGA16MOBJ)
  107. !   > temp.rsp
  108.     $(LIB) $(LIB_FLAGS) $< @temp.rsp
  109.     del temp.rsp
  110.  
  111. # Move files from mgraph directory into the correct place for compilation
  112.  
  113. MGRAPH_STUFF    = detectgr.asm mgraph.equ mgraph.var modes.c modes.inc  \
  114.                   sv_ports.asm sv_maxpg.asm model.mac drivers.h names.c
  115.  
  116. mgraph:
  117.     cd ..
  118.     copy $(MGRAPH_STUFF) drivers
  119.     cd drivers
  120.  
  121. killmgraph:
  122.     move $(MGRAPH_STUFF) ..
  123.  
  124. # Clean up directory removing all files not needed to make the library
  125.  
  126. clean:
  127.     @del *.sym *.bak *.tdk *.map *.dsk
  128.     except (uni0.obj) del *.obj
  129.  
  130. realclean:  clean
  131.     @del *.exe *.lib
  132.  
  133. stamp:
  134.     @foreach "rcs -N$(VERSION): -srelease" files.lst
  135.  
  136. rcsclean:
  137.     @foreach rcsclean files.lst
  138.  
  139. # Check in the latest revisions of source files with RCS
  140.  
  141. ci:
  142.     @foreach "ci -q -u $(RCSOPT)" files.lst
  143.  
  144. # Check out the latest revisions of source files from RCS
  145.  
  146. co:
  147.     @foreach "co -q $(RCSOPT)" files.lst
  148.  
  149.