home *** CD-ROM | disk | FTP | other *** search
/ Share Gallery 1 / share_gal_1.zip / share_gal_1 / DT / DT023A.ZIP / INC-DOCS.LZH / APPNOTES.LZH / MAKE.APP / MK.TPL < prev   
Text File  |  1990-03-06  |  5KB  |  155 lines

  1. # makefile for : 
  2. # Version      : 1.0
  3. # Date         : 
  4. # Author       : 
  5. # Depends on   : 
  6. # Copyright 1990 <your outfit>; all rights reserved
  7.  
  8. ###########################################################################
  9. #   This section describes the environment in which package is to be made
  10. ###########################################################################
  11. MODEL      = L
  12. EXEC_DIR   = c:\local
  13. LIB_DIR    = c:\lib
  14. INCL_DIR   = c:\include
  15. DOC_DIR    = c:\docs
  16. ARCHIVER   = pkarc u
  17. SRC_PRINT  = do4print
  18. DOCUMENTER = hrrdoc
  19. LIBRARIES  = 
  20.  
  21. ###########################################################################
  22. #   This section describes the contents of the package
  23. ###########################################################################
  24.  
  25. # The following are source objects
  26. PKG_NAME  = 
  27. INCLUDE   = 
  28. SOURCES   = 
  29. MAKEFILE  = 
  30. TEST_SRC  = 
  31.  
  32. # The following are derived objects creatable by this makefile
  33. OBJECTS   = 
  34. EXEC      = 
  35. DOCUMENT  = 
  36. LIBRARY   = 
  37. # example: LIBRARY   = hrrutil$(MODEL).lib
  38. TEST_OBJ  = 
  39. TEST_EXEC = $(EXEC)
  40.  
  41. ###########################################################################
  42. #   The next section controls compilation and linking
  43. ###########################################################################
  44.  
  45. ASM_FLAGS      = -ml -c -l -t -z
  46. TEST_ASM_FLAGS = 
  47. C_FLAGS        = -c -Ox -G0 -A$(MODEL) -Fc -D LINT_ARGS
  48. TEST_C_FLAGS   = -c -Od -G0 -A$(MODEL) -Fc -Zi -D LINT_ARGS
  49. LINK_FLAGS     = /CO /NOI
  50.  
  51. .SUFFIXES .obj .c .asm
  52.  
  53. .c.obj :
  54.     cl $(TEST_C_FLAGS) $*.c
  55.  
  56. .asm.obj :
  57.     masm $(ASM_FLAGS) $*;
  58.  
  59. ###########################################################################
  60. #   The next section contains standard targets required by RIS policy
  61. ###########################################################################
  62.  
  63. # The following (default) target should create the entire package
  64. all : $(EXEC) $(OBJECTS) $(LIBRARY) $(DOCUMENT) $(TEST_EXEC)
  65.  
  66. # The following target should create an archive containing all sources
  67. archive :
  68.     $(ARCHIVER) $(PKG_NAME) $(INCLUDE) $(SOURCES) $(MAKEFILE) $(TEST_SRC)
  69.  
  70. # The following target should delete everything automatically creatable
  71. # NOTE: make sure it isn't deleting anything important!
  72. cleanup :
  73.     del *.bak
  74.     del *.cod
  75.     del *.crf
  76.     del *.exe
  77.     del *.lst
  78.     del *.map
  79.     del *.obj
  80.     del *.xrf
  81.     del $(DOCUMENT)
  82.     del $(LIBRARY)
  83.  
  84. # The following target should invoke codeview on test or main program
  85. # NOTE: assumes use of TEST_C_FLAGS, above
  86. debug   : $(OBJECTS) $(LIBRARY) $(DOCUMENT) $(TEST_EXEC)
  87.     cv /w /s /m /cGmain /43 $(TEST_EXEC)
  88.  
  89. # The following target should install this package in the local environment
  90. # NOTE: comment out or remove any that don't apply
  91. install : $(EXEC) $(LIBRARY) $(DOCUMENT)
  92. #    copy $(EXEC)     $(EXEC_DIR)
  93. #    copy $(LIBRARY)  $(LIB_DIR)
  94. #    copy $(INCLUDE)  $(INCL_DIR)
  95. #    copy $(DOCUMENT) $(DOC_DIR)
  96.  
  97. # The following target should print the generated documentation
  98. print   : $(DOCUMENT)
  99.     $(SRC_PRINT) $(DOCUMENT)
  100.  
  101. # The following target should print the source
  102. printsrc :
  103.     $(SRC_PRINT) $(INCLUDE) $(SOURCES)
  104.  
  105. # The following target should execute the test program
  106. # This forces creation of everything, since it is often used to make package
  107. test    : $(EXEC) $(OBJECTS) $(LIBRARY) $(DOCUMENT) $(TEST_EXEC)
  108.     $(TEST_EXEC)
  109.  
  110. # The following target should remove the package from the local environment
  111. # NOTE: comment out or remove any that don't apply
  112. uninstall :
  113. #    del $(EXEC_DIR)\$(EXEC)
  114. #    del $(LIB_DIR)\$(LIBRARY)
  115. #    del $(INCL_DIR)\$(INCLUDE)
  116. #    del $(DOC_DIR)\$(DOCUMENT)
  117.  
  118. ###########################################################################
  119. #   The remainder of the makefile concerns dependencies and creation
  120. #   instructions for the particular components of the package.  This
  121. #   section ALWAYS requires hand-crafting.
  122. ###########################################################################
  123.  
  124. # Compile and link the executable program
  125. #$(EXEC) : $(OBJECTS) $(LIBRARY)
  126. #    link $(OBJECTS), $(EXEC), $(PKG_NAME).map, .\$(LIBRARY) \
  127. #            $(LIBRARIES) $(LINK_FLAGS)
  128.  
  129. # Make the library
  130. #$(LIBRARY) : $(OBJECTS)
  131. #    lib $(LIBRARY) -+ obj1;
  132. #    lib $(LIBRARY) -+ obj2;
  133. #    lib $(LIBRARY) -+ objlast, $(PKG_NAME).xrf;
  134.  
  135. # Create a document from the source files
  136. # if you change how this document is constructed, check cleanup target
  137. $(DOCUMENT) : $(INCLUDE) $(SOURCES)
  138.     $(DOCUMENTER) < $(INCLUDE) > $(DOCUMENT)
  139.     $(DOCUMENTER) < source1.c >> $(DOCUMENT)
  140.     $(DOCUMENTER) < source2.c >> $(DOCUMENT)
  141.  
  142. # Compile the test program for the library
  143. #$(TEST_EXEC) : $(TEST_OBJ) $(LIBRARY)
  144. #    link $(TEST_OBJ), $(TEST_EXEC), $(PKG_NAME).map, .\$(LIBRARY) \
  145. #            $(LIBRARIES) $(LINK_FLAGS)
  146.  
  147. # The following are predecessors of the object modules in this package
  148. #test.obj     : sample.h test.c
  149. #obj1.obj     : sample.h obj1.c
  150.  
  151. ###########################################################################
  152. #   PROBLEMS WITH THIS MAKEFILE TEMPLATE
  153. ###########################################################################
  154. # Need serious solution to library make (use touch trick)
  155.