home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / PROGRAM / CTOOLS10.ZIP / MAKEFILE < prev    next >
Text File  |  1992-04-06  |  3KB  |  112 lines

  1. #############################################################################
  2. #
  3. #                   Copyright (C) 1991 Kendall Bennett.
  4. #                           All rights reserved.
  5. #
  6. # Descripton:   Makefile for the tools.lib library.
  7. #               PC Version for Borland C++ 2.0
  8. #
  9. # $Id: makefile.pc 1.5 91/09/27 21:53:56 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       = \bc\lib\mylib
  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. # This will need to be changed to point to your include file directory
  31.  
  32. INC_DEST        = \bc\include\myinc
  33.  
  34. LIBNAME         = tools_            # name of library file to create
  35.  
  36. !if $d(debug)
  37. CC_DOPT         = -v                # Turn on debugging for C compiler
  38. ASM_DOPT        = /zi               # Turn on debugging for assembler
  39. !endif
  40.  
  41. # Set up memory model macros depending on version we are making
  42.  
  43. !if $d(medium)
  44. MODEL           = m
  45. ASM_MODEL       = /d__MEDIUM__
  46. !elif $d(compact)
  47. MODEL           = c
  48. ASM_MODEL       = /d__COMPACT__
  49. !elif $d(large)
  50. MODEL           = l
  51. ASM_MODEL       = /d__LARGE__
  52. !elif $(huge)
  53. MODEL           = h
  54. ASM_MODEL       = /d__HUGE__
  55. !else
  56. MODEL           = s                 # Default to small model
  57. ASM_MODEL       = /d__SMALL__
  58. !endif
  59.  
  60. LIBFILE         = $(.PATH.lib)\$(LIBNAME)$(MODEL).lib
  61. ASM_FLAGS       = /MX /m /i$(.PATH.asm) $(ASM_DOPT) $(ASM_MODEL)
  62. CC_FLAGS        = -m$(MODEL) $(CC_DOPT)
  63.  
  64. # Implicit rules to make the object files for the library...
  65.  
  66. .c.obj:
  67.     $(CC) $(CC_FLAGS) -c {$< }
  68.      
  69. .asm.obj:
  70.     $(ASM) $(ASM_FLAGS) $<, $(.PATH.obj)\$&
  71.  
  72. # All the object modules in the library
  73.  
  74. OBJECTS         = dlist.obj getopt.obj hash.obj hashadd.obj hashpjw.obj     \
  75.                   list.obj random.obj set.obj ssort.obj avl.obj
  76.  
  77. all: $(LIBFILE) install_inc
  78.  
  79. build: $(LIBFILE)
  80.  
  81. $(LIBFILE): $(OBJECTS)
  82.     $(LIB) $(LIB_FLAGS) $< @tools.fil
  83.  
  84. # Install the header files in the correct directory for normal use
  85.  
  86. install_inc:
  87.     @copy *.h $(INC_DEST)
  88.  
  89. clean:
  90.     @del *.obj *.exe *.sym *.bak tools.zoo
  91.     @del $(.PATH.lib)\*.bak
  92.  
  93. rcsclean:
  94.     rcsclean *.c *.h
  95.  
  96. # Check in the latest revisions of source files with RCS
  97.  
  98. ci:
  99.     -ci -q -u cstub.c dlist.c getopt.c hash.c hashadd.c hashpjw.c list.c
  100.     -ci -q -u random.c set.c ssort.c avl.c
  101.     -ci -q -u debug.h dlist.h getopt.h hash.h list.h random.h set.h ssort.h
  102.     -ci -q -u stack.h stk.h avl.h
  103.  
  104. # Check out the latest revisions of source files from RCS
  105.  
  106. co:
  107.     -co  cstub.c dlist.c getopt.c hash.c hashadd.c hashpjw.c list.c
  108.     -co  random.c set.c ssort.c avl.c
  109.     -co  debug.h dlist.h getopt.h hash.h list.h random.h set.h ssort.h
  110.     -co  stack.h stk.h avl.h
  111.  
  112.