home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v5.zip / DDKX86 / SRC / DEV / DASD / DEVHELP / MAKEFILE < prev   
Encoding:
Text File  |  1995-04-14  |  8.0 KB  |  261 lines

  1. # SCCSID = @(#)makefile 6.4 92/05/08
  2. #/***********************************************************************/
  3. #/*                                    */
  4. #/* Driver Name: DHCALLS.LIB - C Callable DevHelp Interface        */
  5. #/*         ------------------------------------------        */
  6. #/*                                    */
  7. #/* Source File Name: MAKEFILE                        */
  8. #/*                                    */
  9. #/* Descriptive Name: MAKEFILE for DHCALLS.LIB                */
  10. #/*                                    */
  11. #/* Function:                                */
  12. #/*                                    */
  13. #/*                                    */
  14. #/*---------------------------------------------------------------------*/
  15. #/*                                    */
  16. #/* Copyright (C) 1992 IBM Corporation                    */
  17. #/*                                    */
  18. #/* DISCLAIMER OF WARRANTIES.  The following [enclosed] code is     */
  19. #/* provided to you solely for the purpose of assisting you in        */
  20. #/* the development of your applications. The code is provided        */
  21. #/* "AS IS", without warranty of any kind. IBM shall not be liable      */
  22. #/* for any damages arising out of your use of this code, even if    */
  23. #/* they have been advised of the possibility of such damages.        */
  24. #/*                                    */
  25. #/*---------------------------------------------------------------------*/
  26. #/*                                    */
  27. #/* Change Log                                */
  28. #/*                                    */
  29. #/* Mark    Date      Programmer  Comment                */
  30. #/* ----    ----      ----------  -------                */
  31. #/*        09/25/92  Kip Harris  Added DHCALL12 to .OBJ targets,    */
  32. #/*                  with Feature 26087.            */
  33. #/*                                    */
  34. #/***********************************************************************/
  35. #
  36. #
  37. #    You can optionally generate the listing files for the device driver.
  38. #
  39. #       make  [option]
  40. #
  41. #         option:     list          -> create listings
  42. #             dhcalls.lib  ->
  43. #
  44. #         default:  create dhcalls.lib
  45. #
  46. # ******  NOTE    ******
  47. #
  48. #     If you are using a SED command with TAB characters, many editors
  49. #     will expand tabs causing unpredictable results in other programs.
  50. #
  51. #     Documentation:
  52. #
  53. #     Using SED command with TABS. Besure to invoke set tab save option
  54. #     on your editor. If you don't, the program 'xyz' will not work
  55. #     correctly.
  56. #
  57.  
  58. #****************************************************************************
  59. #  Dot directive definition area (usually just suffixes)
  60. #****************************************************************************
  61.  
  62. .SUFFIXES:
  63. .SUFFIXES: .com .sys .exe .obj .mbj .asm .inc .def .lnk .lrf .crf .ref
  64. .SUFFIXES: .lst .sym .map .c .h .lib
  65.  
  66. #****************************************************************************
  67. #  Environment Setup for the component(s).
  68. #****************************************************************************
  69.  
  70. #
  71. # Conditional Setup Area and User Defined Macros
  72. #
  73.  
  74. #
  75. # Compiler Location w/ includes, libs and tools
  76. #
  77.  
  78. DOSINC = ..\..\..\dos\dosinc
  79. INIT   = ..\..\..\dos\init
  80. TASK   = ..\..\..\dos\task
  81. INC    = ..\..\..\..\inc
  82. H      = ..\..\..\..\h
  83. LIB    = ..\..\..\..\lib
  84. TOOLSPATH = ..\..\..\..\tools
  85. DISKH  = ..\diskh
  86. DEVLIB = ..\devhelp
  87.  
  88. #
  89. # Since the compiler/linker and other tools use environment
  90. # variables ( INCLUDE, LIB, etc ) in order to get the location of files,
  91. # the following line will check the environment for the LIFE of the
  92. # makefile and will be specific to this set of instructions. All MAKEFILES
  93. # are requested to use this format to insure that they are using the correct
  94. # level of files and tools.
  95. #
  96.  
  97. !if [set INCLUDE=$(DOSINC);$(INIT);$(TASK);$(INC)] || \
  98.    [set LIB=$(LIB)] || [set PATH=$(TOOLSPATH);$(DK_TOOLS)]
  99. !endif
  100.  
  101.  
  102. #
  103. # Compiler/tools Macros
  104. #
  105.  
  106. AS=masm
  107. CC=cl
  108. IMPLIB=implib
  109. IPF=ipfc
  110. LIBUTIL=lib
  111. LINK=link
  112. MAPSYM=mapsym
  113. RC=rc
  114.  
  115. #
  116. # Compiler and Linker Options
  117. #
  118.  
  119. AFLAGS = -MX -T -Z $(ENV)
  120. AINC   = -I. -I$(DOSINC) -I$(INIT) -I$(TASK) -I$(INC)
  121. CINC   = -I$(H) -I$(DISKH) -I$(MAKEDIR)
  122. CFLAGS = /c /Zp /G2s /Answ $(ENV)
  123. LFLAGS = /map /noi /nod /exepack /packd /a:16 /far
  124. RFLAGS = -r
  125.  
  126. LIBS  =  $(DEVLIB)\dhcalls.lib
  127. DEF02 =  os2dasd.def
  128.  
  129. #****************************************************************************
  130. # Set up Macros that will contain all the different dependencies for the
  131. # executables and dlls etc. that are generated.
  132. #****************************************************************************
  133.  
  134. #
  135. #
  136. #
  137. OBJ1x  = dhcall1.obj dhcall1a.obj dhcall1b.obj dhcall1c.obj
  138. OBJ2x  = dhcall2.obj dhcall2a.obj dhcall2b.obj dhcall2c.obj dhcall2d.obj \
  139.      dhcall2e.obj
  140. OBJ3x  = dhcall3.obj dhcall3a.obj
  141. OBJ5x  = dhcall5.obj dhcall5a.obj dhcall5b.obj
  142. OBJ6x  = dhcall6.obj dhcall6a.obj dhcall6b.obj dhcall6c.obj
  143. OBJ8x  = dhcall8.obj dhcall8a.obj dhcall8b.obj
  144. OBJ11x = dhcall11.obj dhcal11a.obj dhcal11b.obj dhcal11c.obj dhcal11d.obj \
  145.      dhcal11e.obj dhcal11f.obj dhcal11g.obj dhcal11h.obj dhcal11i.obj
  146.  
  147. OBJ1 =    $(OBJ1x) $(OBJ2x) $(OBJ3x) dhcall4.obj
  148. OBJ2 =    $(OBJ5x) $(OBJ6x) dhcall7.obj $(OBJ8x)
  149. OBJ3 =    dhcall9.obj dhcall10.obj $(OBJ11x) dhcall12.obj dhret.obj
  150.  
  151. #
  152. #    LIST Files
  153. #
  154.  
  155. LST1x  = dhcall1.lst dhcall1a.lst dhcall1b.lst dhcall1c.lst
  156. LST2x  = dhcall2.lst dhcall2a.lst dhcall2b.lst dhcall2c.lst dhcall2d.lst \
  157.      dhcall2e.lst
  158. LST3x  = dhcall3.lst dhcall3a.lst
  159. LST5x  = dhcall5.lst dhcall5a.lst dhcall5b.lst
  160. LST6x  = dhcall6.lst dhcall6a.lst dhcall6b.lst dhcall6c.lst
  161. LST8x  = dhcall8.lst dhcall8a.lst dhcall8b.lst
  162. LST11x = dhcall11.lst dhcal11a.lst dhcal11b.lst dhcal11c.lst dhcal11d.lst \
  163.      dhcal11e.lst dhcal11f.lst dhcal11g.lst dhcal11h.lst dhcal11i.lst
  164.  
  165. LST1 =    $(LST1x) $(LST2x) $(LST3x) dhcall4.lst
  166. LST2 =    $(LST5x) $(LST6x) dhcall7.lst $(LST8x)
  167. LST3 =    dhcall9.lst dhcall10.lst $(LST11x) dhcall12.lst dhret.lst
  168.  
  169. LIST = $(LST1) $(LST2) $(LST3)
  170. OBJS = $(OBJ1)    $(OBJ2)  $(OBJ3)
  171.  
  172. #****************************************************************************
  173. #   Setup the inference rules for compiling and assembling source code to
  174. #   obejct code.
  175. #****************************************************************************
  176.  
  177.  
  178. .asm.obj:
  179.     $(AS) $(AFLAGS) $(AINC) $*.asm;
  180.  
  181.  
  182. .asm.lst:
  183.     $(AS) -l -n $(AFLAGS) $(AINC) $*.asm;
  184.  
  185. .c.obj:
  186.     $(CC) $(CFLAGS) $(CINC) $*.c
  187.  
  188. .c.lst:
  189.     $(CC) $(CFLAGS) /Fl $(CINC) $*.c
  190.     copy $*.cod $*.lst
  191.     del $*.cod
  192.  
  193.  
  194. #****************************************************************************
  195. #   Target Information
  196. #****************************************************************************
  197. #
  198. # This is a very important step. The following small amount of code MUST
  199. # NOT be removed from the program. The following directive will do
  200. # dependency checking every time this component is built UNLESS the
  201. # following is performed:
  202. #             A specific tag is used -- ie. all
  203. #
  204. # This allows the developer as well as the B & I group to perform incremental
  205. # build with a degree of accuracy that has not been used before.
  206. # There are some instances where certain types of INCLUDE files must be
  207. # created first. This type of format will allow the developer to require
  208. # that file to be created first. In order to achive that, all that has to
  209. # be done is to make the DEPEND.MAK tag have your required target. Below is
  210. # an example:
  211. #
  212. #    depend.mak:   { your file(s) } dephold
  213. #
  214. # Please DON'T remove the following line
  215. #
  216.  
  217.  
  218. #
  219. # Should be the default tag for all general processing
  220. #
  221.  
  222. all:    dhcalls.lib
  223.  
  224. list: $(LST)
  225.  
  226. clean:
  227.     if exist *.lnk    del *.lnk
  228.     if exist *.obj    del *.obj
  229.     if exist *.mbj    del *.mbj
  230.     if exist *.map    del *.map
  231.     if exist *.old    del *.old
  232.     if exist *.lst    del *.lst
  233.     if exist *.lsd    del *.lsd
  234.     if exist *.sym    del *.sym
  235.     if exist *.sys    del *.sys
  236.     if exist *.tff    del *.tff
  237.  
  238.  
  239. #*****************************************************************************
  240. #   Specific Description Block Information
  241. #*****************************************************************************
  242.  
  243. # This section would only be for specific direction as to how to create
  244. # unique elements that are necessary to the build process. This could
  245. # be compiling or assembling, creation of DEF files and other unique
  246. # files.
  247. # If all compiler and assembly rules are the same, use an inference rule to
  248. # perform the compilation.
  249. #
  250.  
  251. dhcalls.lib:  $(OBJS) makefile
  252.     -erase        $*.lib > NUL
  253.     $(LIBUTIL)  @<<$(@B).lnk
  254. $@
  255. y
  256. $(OBJS);
  257. <<keep
  258.  
  259.  
  260. #****************************************************************************
  261.