home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / zen / ztimer / makefile < prev    next >
Encoding:
Makefile  |  1992-01-27  |  2.9 KB  |  108 lines

  1. #############################################################################
  2. #
  3. #                                 Zen Timer
  4. #
  5. #                               From the book
  6. #                         "Zen of Assembly Language"
  7. #                            Volume 1, Knowledge
  8. #
  9. #                             by Michael Abrash
  10. #
  11. #                    Makefile for a memory model indepedant
  12. #                    'C' callable library by Kendall Bennett
  13. #
  14. # Descripton:    Makefile for the Zen Timer library.
  15. #
  16. # $Id: makefile 1.3 92/01/27 21:40:16 kjb release $
  17. #
  18. #############################################################################
  19.  
  20. # Turn on autodependency checking
  21.  
  22. .AUTODEPEND
  23.  
  24. # Let make know where to find all the appropriate files
  25.  
  26. .PATH.asm       = .
  27. .PATH.lib       = \bc\lib\mylib
  28. .PATH.obj       = .
  29. .PATH.exe       = .
  30.  
  31. # These directives will need to be modified for your particular setup.
  32. # Currently the are set for use with Borland C++ 3.0 installed in
  33. # the directory "BC" rather than "BORLANDC" as is the default.
  34.  
  35. CC              = bcc               # Name of C compiler
  36. ASM             = tasm              # Name of assembler
  37. LINK            = tlink             # Name of linker
  38. LIB             = tlib              # Name of librarian
  39. LIB_FLAGS       = /C /E
  40.  
  41. # This will need to be changed to your normal include file directory
  42.  
  43. INC_DEST        = \bc\include\myinc
  44.  
  45. LIBNAME         = ztimer            # Name of library file to create
  46.  
  47. !if $d(debug)
  48. CC_DOPT         = -v                # Turn on debugging for C compiler
  49. ASM_DOPT        = /ZI               # Turn on debugging for assembler
  50. !endif
  51.  
  52. # This library is memory model independant, but MUST be compiled in the
  53. # small model (I havent tested compiling in any other model, but it will
  54. # work correctly with code compiled in any model).
  55.  
  56. MODEL           = s                 # Default to small model
  57. ASM_MODEL       = /d__SMALL__
  58.  
  59. LIBFILE         = $(.PATH.lib)\$(LIBNAME).lib
  60. ASM_FLAGS       = /MX /m /O /i$(.PATH.asm) $(ASM_DOPT) $(ASM_MODEL)
  61. CC_FLAGS        = -m$(MODEL) $(CC_DOPT)
  62.  
  63. # Implicit rules to make the object files for the library...
  64.  
  65. .c.obj:
  66.     $(CC) $(CC_FLAGS) -c {$< }
  67.      
  68. .asm.obj:
  69.     $(ASM) $(ASM_FLAGS) $<, $&
  70.  
  71. # Object files required by the library
  72.  
  73. OBJECTS         = pztimer.obj lztimer.obj
  74.  
  75. all: $(LIBFILE) install_inc
  76.  
  77. # Just build the library, don't install the header files
  78.  
  79. build: $(LIBFILE)
  80.  
  81. $(LIBFILE): $(OBJECTS)
  82.     $(LIB) $(LIB_FLAGS) $< +-pztimer +-lztimer
  83.  
  84. install_inc:
  85.     @copy ztimer.h $(INC_DEST)
  86.  
  87. # Clean up directory removing all files not needed to make the library.
  88. # This works for 4Dos 4.0. If you are running under MS DOS, you will
  89. # probably need to change this to delete each file type separately.
  90.  
  91. clean:
  92.     @del *.obj *.sym *.bak *.exe *.tdk
  93.     @del $(.PATH.lib)\*.bak
  94.  
  95. rcsclean:
  96.     @rcsclean *.h *.c *.asm
  97.  
  98. # Check in the latest revisions of source files with RCS
  99.  
  100. ci:
  101.     -ci -q -u pztimer.asm lztimer.asm ztimer.h
  102.  
  103. # Check out the latest revisions of source files from RCS
  104.  
  105. co:
  106.     -co -q pztimer.asm lztimer.asm ztimer.h
  107.  
  108.