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

  1. # SCCSID = src/dev/dasd/os2aspi/makefile, aspi, r206 92/06/26
  2. #/***********************************************************************/
  3. #/*                                                                     */
  4. #/* Driver Name: OS2ASPI.DMD - OS/2 ASPI Device Manager                 */
  5. #/*              --------------------------------------                 */
  6. #/*                                                                     */
  7. #/* Source File Name: MAKEFILE                                          */
  8. #/*                                                                     */
  9. #/* Descriptive Name: MAKEFILE for OS2ASPI.DMD                          */
  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. #/* @nnnn   mm/dd/yy  NNN                                               */
  32. #/*                                                                     */
  33. #/*                                                                     */
  34. #/***********************************************************************/
  35. #
  36. #       makefile for OS/2 2.0 ASPI Device Manager
  37. #
  38. #       You can optionally generate the listing files for the device driver.
  39. #
  40. #          make  [option]
  41. #
  42. #            option:     list         -> create listings
  43. #                        OS2ASPI.DMD  -> create OS2ASPI Device Mgr
  44. #
  45. #            default:  create OS2ASPI.DMD
  46. #
  47. # ******  NOTE  ******
  48. #
  49. #        If you are using a SED command with TAB characters, many editors
  50. #        will expand tabs causing unpredictable results in other programs.
  51. #
  52. #        Documentation:
  53. #
  54. #        Using SED command with TABS. Besure to invoke set tab save option
  55. #        on your editor. If you don't, the program 'xyz' will not work
  56. #        correctly.
  57. #
  58.  
  59. #****************************************************************************
  60. #  Dot directive definition area (usually just suffixes)
  61. #****************************************************************************
  62.  
  63. .SUFFIXES:
  64. .SUFFIXES: .com .add .exe .obj .mbj .asm .inc .def .lnk .lrf .crf .ref
  65. .SUFFIXES: .lst .sym .map .c .h .lib
  66.  
  67. #****************************************************************************
  68. #  Environment Setup for the component(s).
  69. #****************************************************************************
  70.  
  71. #
  72. # Conditional Setup Area and User Defined Macros
  73. #
  74.  
  75. #
  76. # Compiler Location w/ includes, libs and tools
  77. #
  78.  
  79. #INC    = ..\..\..\..\inc
  80. #H      = ..\..\..\..\h
  81. #LIB    = ..\..\..\..\lib
  82. #TOOLSPATH = ..\..\..\..\..\tools
  83. #DISKH  = ..\..\diskh
  84. #DHLIB  = ..\..\devhelp
  85. #ADDLIB  = ..\..\addcalls
  86. INC    = ..\..\..\..\inc
  87. H      = ..\..\..\..\h
  88. LIB    = ..\..\..\..\lib
  89. TOOLSPATH = ..\..\..\..\tools
  90. DISKH  = ..\diskh
  91. DISKINC = ..\diskinc
  92. DHLIB  = ..\devhelp
  93. ADDLIB = ..\addcalls
  94.  
  95. HFLAGS= -d -f -w -s
  96.  
  97. #
  98. # Since the compiler/linker and other tools use environment
  99. # variables ( INCLUDE, LIB, etc ) in order to get the location of files,
  100. # the following line will check the environment for the LIFE of the
  101. # makefile and will be specific to this set of instructions. All MAKEFILES
  102. # are requested to use this format to insure that they are using the correct
  103. # level of files and tools.
  104. #
  105.  
  106. !if [set INCLUDE=$(H);$(INC)] || \
  107.    [set LIB=$(LIB);$(DHLIB);$(ADDLIB)] || [set PATH=$(TOOLSPATH);$(DK_TOOLS)]
  108. !endif
  109.  
  110.  
  111. #
  112. # Compiler/tools Macros
  113. #
  114.  
  115. AS=masm
  116. CC=cl
  117. IMPLIB=implib
  118. IPF=ipfc
  119. LIBUTIL=lib
  120. LINK=link
  121. MAPSYM=mapsym
  122. RC=rc
  123.  
  124. #
  125. # Compiler and Linker Options
  126. #
  127.  
  128. AFLAGS = -MX -T -Z $(ENV)
  129. AINC   = -I. -I$(DISKINC) -I$(INC)
  130. CINC   = -I. -I$(H) -I$(DISKH)
  131. CFLAGS = /c /Zp /Oe /Og /Oc /Ol /Ot /Gs /Oa /Oz /G2s /Answ $(ENV)
  132. DFLAGS = /c /Zp /G2s /Answ /W3 $(ENV) -DDEBUG
  133. LFLAGS = /map /nod /exepack /packd /a:16 /far
  134. RFLAGS = -r
  135.  
  136. LIBS  =  $(DHLIB)\dhcalls.lib $(ADDLIB)\addcalls.lib
  137.  
  138. #****************************************************************************
  139. # Set up Macros that will contain all the different dependencies for the
  140. # executables and dlls etc. that are generated.
  141. #****************************************************************************
  142.  
  143. #
  144. # OBJ files
  145. #
  146. #OBJ1 =  ASPISEGS.OBJ ASPIDATA.OBJ ASPISTR1.OBJ aspiasub.OBJ
  147. OBJ1 =  ASPISEGS.OBJ ASPIDATA.OBJ ASPISTR1.OBJ aspisrb.obj
  148. OBJ2 =  ASPIASUB.OBJ ASPIVIRT.OBJ ASPIINIT.OBJ CMDPARSE.OBJ
  149. OBJ3 =
  150. #
  151. #       Debug files
  152. #
  153. DBJ1 =
  154. DBJ2 =
  155. DBJ3 =
  156. #
  157. #       LIST Files
  158. #
  159. #LST1=   ASPISEGS.LST ASPIDATA.COD ASPISTR1.COD ASPISRB.COD
  160. LST1=   ASPISEGS.LST ASPIDATA.LST ASPISTR1.LST ASPISRB.LST
  161. LST2=   aspiasub.LST ASPIVIRT.LST aspiinit.lst CMDPARSE.LST
  162. LIST=  $(LST1) $(LST2) $(LST3)
  163. OBJS = $(OBJ1) $(OBJ2) $(OBJ3)
  164. DBJS = $(DBJ1) $(DBJ2) $(DBJ3)
  165.  
  166. #****************************************************************************
  167. #   Setup the inference rules for compiling and assembling source code to
  168. #   obejct code.
  169. #****************************************************************************
  170.  
  171.  
  172. .asm.obj:
  173.         $(AS) $(AFLAGS) $(AINC) $*.asm;
  174.  
  175. .asm.mbj:
  176.         $(AS) $(AFLAGS) -DMMIOPH $(AINC) $*.asm $*.mbj;
  177.  
  178. .asm.lst:
  179.         $(AS) -l -n $(AFLAGS) $(AINC) $*.asm;
  180.  
  181. .c.obj:
  182.         $(CC) $(CFLAGS) $(CINC) $*.c
  183.  
  184. .c.dbj:
  185.         $(CC) $(DFLAGS) $(CINC) $*.c
  186.  
  187. .c.lst:
  188.         $(CC) $(CFLAGS) /Fc $(CINC) $*.c
  189.         copy $*.cod $*.lst
  190.         del $*.cod
  191.  
  192. .h.inc:
  193.         H2INC $(HFLAGS) $*.h -o $*.inc
  194.  
  195.  
  196. #****************************************************************************
  197. #   Target Information
  198. #****************************************************************************
  199. #
  200. # This is a very important step. The following small amount of code MUST
  201. # NOT be removed from the program. The following directive will do
  202. # dependency checking every time this component is built UNLESS the
  203. # following is performed:
  204. #                    A specific tag is used -- ie. all
  205. #
  206. # This allows the developer as well as the B & I group to perform incremental
  207. # build with a degree of accuracy that has not been used before.
  208. # There are some instances where certain types of INCLUDE files must be
  209. # created first. This type of format will allow the developer to require
  210. # that file to be created first. In order to achive that, all that has to
  211. # be done is to make the DEPEND.MAK tag have your required target. Below is
  212. # an example:
  213. #
  214. #    depend.mak:   { your file(s) } dephold
  215. #
  216. # Please DON'T remove the following line
  217. #
  218.  
  219. !include      "$(H)\version.mak"
  220.  
  221. #
  222. # Should be the default tag for all general processing
  223. #
  224.  
  225. all:   os2aspi.dmd
  226.  
  227. inc:
  228.  
  229. list: $(LIST)
  230.  
  231. clean:
  232.         if exist *.lnk  del *.lnk
  233.         if exist *.obj  del *.obj
  234.         if exist *.mbj  del *.mbj
  235.         if exist *.map  del *.map
  236.         if exist *.old  del *.old
  237.         if exist *.lst  del *.lst
  238.         if exist *.lsd  del *.lsd
  239.         if exist *.sym  del *.sym
  240.         if exist *.sys  del *.sys
  241.         if exist *.tff  del *.tff
  242.         if exist *.cod  del *.cod
  243.         if exist *.add  del *.add
  244.  
  245.  
  246. #****************************************************************************
  247. #   OBJ dependant  rules for compiling and assembling source code
  248. #****************************************************************************
  249.  
  250.  
  251. #*****************************************************************************
  252. #   Specific Description Block Information
  253. #*****************************************************************************
  254.  
  255. # This section would only be for specific direction as to how to create
  256. # unique elements that are necessary to the build process. This could
  257. # be compiling or assembling, creation of DEF files and other unique
  258. # files.
  259. # If all compiler and assembly rules are the same, use an inference rule to
  260. # perform the compilation.
  261. #
  262.  
  263. os2aspi.dmd:  $(OBJS) $(LIBS) makefile
  264.         Rem Create DEF file <<$*.def
  265. LIBRARY OS2ASPI
  266.  
  267. DESCRIPTION "$(FILEVER) OS/2 ASPI Device Manager"
  268.  
  269. PROTMODE
  270.  
  271. SEGMENTS
  272.  AspiHeader     CLASS 'DATA'
  273.  CONST          CLASS 'CONST'
  274.  _BSS           CLASS 'BSS'
  275.  LIBDATA        CLASS 'DATA'
  276.  _DATA          CLASS 'DATA'
  277.  'CODE'         CLASS 'CODE' IOPL
  278.  _TEXT          CLASS 'CODE' IOPL
  279.  LIBCODE        CLASS 'CODE' IOPL
  280.  
  281.  
  282. <<keep
  283.         $(LINK) $(LFLAGS) @<<$(@B).lnk
  284. $(OBJ1) +
  285. $(OBJ2) +
  286. $(OBJ3)
  287. $*.dmd
  288. $*.map
  289. $(LIBS)
  290. $*.def
  291. <<keep
  292.              $(MAPSYM) $*.map
  293.  
  294.  
  295.  
  296. #****************************************************************************
  297.