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

  1. # SCCSID = %w% %e%
  2.  
  3. #/***********************************************************************/
  4. #/*                                                                     */
  5. #/* Driver Name: OS2DASD.DMD - OS/2 DASD Device Manager                 */
  6. #/*              --------------------------------------                 */
  7. #/*                                                                     */
  8. #/* Source File Name: MAKEFILE                                          */
  9. #/*                                                                     */
  10. #/* Descriptive Name: MAKEFILE for the OS/2 DASD Manager                */
  11. #/*                                                                     */
  12. #/* Function:                                                           */
  13. #/*                                                                     */
  14. #/*                                                                     */
  15. #/*---------------------------------------------------------------------*/
  16. #/*                                                                     */
  17. #/* Copyright (C) 1992 IBM Corporation                                  */
  18. #/*                                                                     */
  19. #/* DISCLAIMER OF WARRANTIES.  The following [enclosed] code is         */
  20. #/* provided to you solely for the purpose of assisting you in          */
  21. #/* the development of your applications. The code is provided          */
  22. #/* "AS IS", without warranty of any kind. IBM shall not be liable      */
  23. #/* for any damages arising out of your use of this code, even if       */
  24. #/* they have been advised of the possibility of such damages.          */
  25. #/*                                                                     */
  26. #/*---------------------------------------------------------------------*/
  27. #/*                                                                     */
  28. #/* Change Log                                                          */
  29. #/*                                                                     */
  30. #/* Mark    Date      Programmer  Comment                               */
  31. #/* ----    ----      ----------  -------                               */
  32. #/* @nnnn   mm/dd/yy  NNN                                               */
  33. #/*                                                                     */
  34. #/*                                                                     */
  35. #/***********************************************************************/
  36.  
  37. #
  38. #       makefile for OS/2 2.0 Device Independent Disk Driver
  39. #
  40. #       This makefile creates PS/2 386 disk device driver!
  41. #
  42. #       You can optionally generate the listing files for the device driver.
  43. #
  44. #          make  [option]
  45. #
  46. #            option:     list        -> create listings
  47. #                        os2dasd.dmd -> create PS/2 386 RETAIL driver
  48. #
  49. #            default:  create os2dasd.dmd
  50. #
  51. # ******  NOTE  ******
  52. #
  53. #        If you are using a SED command with TAB characters, many editors
  54. #        will expand tabs causing unpredictable results in other programs.
  55. #
  56. #        Documentation:
  57. #
  58. #        Using SED command with TABS. Besure to invoke set tab save option
  59. #        on your editor. If you don't, the program 'xyz' will not work
  60. #        correctly.
  61. #
  62.  
  63. #****************************************************************************
  64. #  Dot directive definition area (usually just suffixes)
  65. #****************************************************************************
  66.  
  67. .SUFFIXES:
  68. .SUFFIXES: .com .sys .exe .obj .mbj .asm .inc .def .lnk .lrf .crf .ref
  69. .SUFFIXES: .lst .sym .map .c .h .lib
  70.  
  71. #****************************************************************************
  72. #  Environment Setup for the component(s).
  73. #****************************************************************************
  74.  
  75. #
  76. # Conditional Setup Area and User Defined Macros
  77. #
  78.  
  79. #
  80. # Compiler Location w/ includes, libs and tools
  81. #
  82.  
  83. DOSINC = ..\..\..\dos\dosinc
  84. INIT   = ..\..\..\dos\init
  85. TASK   = ..\..\..\dos\task
  86. INC    = ..\..\..\..\inc
  87. H      = ..\..\..\..\h
  88. LIB    = ..\..\..\..\lib
  89. TOOLSPATH = ..\..\..\..\tools
  90. DISKH  = ..\diskh
  91. RMH    = ..\..\resource\rsm_h
  92. DHLIB  = ..\devhelp
  93. RMLIB  = ..\..\resource\rmcalls
  94.  
  95. #
  96. # Since the compiler/linker and other tools use environment
  97. # variables ( INCLUDE, LIB, etc ) in order to get the location of files,
  98. # the following line will check the environment for the LIFE of the
  99. # makefile and will be specific to this set of instructions. All MAKEFILES
  100. # are requested to use this format to insure that they are using the correct
  101. # level of files and tools.
  102. #
  103.  
  104. !if [set INCLUDE=$(DOSINC);$(INIT);$(TASK);$(INC);$(RMH)] || \
  105.    [set LIB=$(LIB);$(DHLIB)] || [set PATH=$(TOOLSPATH);$(DK_TOOLS)]
  106. !endif
  107.  
  108.  
  109. #
  110. # Compiler/tools Macros
  111. #
  112.  
  113. AS=masm
  114. CC=cl
  115. IMPLIB=implib
  116. IPF=ipfc
  117. LIBUTIL=lib
  118. LINK=link
  119. MAPSYM=mapsym
  120. RC=rc
  121.  
  122. #
  123. # Compiler and Linker Options
  124. #
  125.  
  126. AFLAGS = -MX -T -Z $(ENV)
  127. AINC   = -I. -I$(DOSINC) -I$(INIT) -I$(TASK) -I$(INC)
  128. CINC   = -I$(H) -I$(DISKH) -I$(MAKEDIR)
  129. #CFLAGS = /c /Fc /Zp /G2s /Answ /NT StaticCode $(ENV)
  130. CFLAGS = /c /Zp /G2s /Answ $(ENV)
  131. LFLAGS = /map /nod /exepack /packd /a:16 /far
  132. RFLAGS = -r
  133.  
  134. LIBS  =  $(DHLIB)\dhcalls.lib $(RMLIB)\rmcalls.lib
  135. DEF02 =  os2dasd.def
  136.  
  137. #****************************************************************************
  138. # Set up Macros that will contain all the different dependencies for the
  139. # executables and dlls etc. that are generated.
  140. #****************************************************************************
  141.  
  142. #
  143. #
  144. #
  145. OBJ1 =  dmsegs.obj
  146. OBJ2 =  dmheader.obj dmbpb.obj dmstrat1.obj dmstrat2.obj dmqueue.obj \
  147.         dmiorb.obj dmcsubr.obj dmasubr.obj dmioctl.obj \
  148.         dmfault.obj dmdata.obj
  149. OBJ3 =  ..\libobj\afuldiv.obj ..\libobj\afulrem.obj ..\libobj\anlmul.obj \
  150.         ..\libobj\anuldiv.obj ..\libobj\anulrem.obj
  151. OBJ4 =  dmtrace.obj dminit.obj
  152.  
  153. #
  154. #       LIST Files
  155. #
  156. LIST= dmsegs.lst dmheader.lst dmbpb.lst dmstrat1.lst dmstrat2.lst dmqueue.lst \
  157.       dmiorb.lst dmcsubr.lst dmasubr.lst dmioctl.lst dmtrace.lst \
  158.       dmfault.lst dmdata.lst \
  159.       dminit.lst
  160.  
  161.  
  162. OBJS = $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4)
  163.  
  164. #****************************************************************************
  165. #   Setup the inference rules for compiling and assembling source code to
  166. #   obejct code.
  167. #****************************************************************************
  168.  
  169.  
  170. .asm.obj:
  171.         $(AS) $(AFLAGS) $(AINC) $*.asm;
  172.  
  173. .asm.mbj:
  174.         $(AS) $(AFLAGS) -DMMIOPH $(AINC) $*.asm $*.mbj;
  175.  
  176. .asm.lst:
  177.         $(AS) -l -n $(AFLAGS) $(AINC) $*.asm;
  178.  
  179. .c.obj:
  180.         $(CC) $(CFLAGS) $(CINC) $*.c
  181.  
  182. .c.lst:
  183.         $(CC) $(CFLAGS) /Fc $(CINC) $*.c
  184.         copy $*.cod $*.lst
  185.         del $*.cod
  186.  
  187.  
  188. #****************************************************************************
  189. #   Target Information
  190. #****************************************************************************
  191. #
  192. # This is a very important step. The following small amount of code MUST
  193. # NOT be removed from the program. The following directive will do
  194. # dependency checking every time this component is built UNLESS the
  195. # following is performed:
  196. #                    A specific tag is used -- ie. all
  197. #
  198. # This allows the developer as well as the B & I group to perform incremental
  199. # build with a degree of accuracy that has not been used before.
  200. # There are some instances where certain types of INCLUDE files must be
  201. # created first. This type of format will allow the developer to require
  202. # that file to be created first. In order to achive that, all that has to
  203. # be done is to make the DEPEND.MAK tag have your required target. Below is
  204. # an example:
  205. #
  206. #    depend.mak:   { your file(s) } dephold
  207. #
  208. # Please DON'T remove the following line
  209. #
  210.  
  211. !include      "$(H)\version.mak"
  212.  
  213. #
  214. # Should be the default tag for all general processing
  215. #
  216.  
  217. all:    os2dasd.dmd
  218.  
  219. list: $(LIST)
  220.  
  221. clean:
  222.         if exist *.lnk  del *.lnk
  223.         if exist *.obj  del *.obj
  224.         if exist *.mbj  del *.mbj
  225.         if exist *.map  del *.map
  226.         if exist *.old  del *.old
  227.         if exist *.lst  del *.lst
  228.         if exist *.lsd  del *.lsd
  229.         if exist *.sym  del *.sym
  230.         if exist *.sys  del *.sys
  231.         if exist *.dmd  del *.dmd
  232.         if exist *.tff  del *.tff
  233.  
  234.  
  235.  
  236.  
  237. #*****************************************************************************
  238. #   Specific Description Block Information
  239. #*****************************************************************************
  240.  
  241. # This section would only be for specific direction as to how to create
  242. # unique elements that are necessary to the build process. This could
  243. # be compiling or assembling, creation of DEF files and other unique
  244. # files.
  245. # If all compiler and assembly rules are the same, use an inference rule to
  246. # perform the compilation.
  247. #
  248.  
  249. os2dasd.dmd:  $(OBJS) $(LIBS) os2dasd.tsf makefile
  250.         Rem Create DEF file <<$(DEF02)
  251. LIBRARY OS2DASD
  252.  
  253. DESCRIPTION '$(FILEVER)  OS/2 DASD Device Manager'
  254.  
  255. PROTMODE
  256.  
  257. SEGMENTS
  258.  _DATA          CLASS 'DATA'
  259.  CONST          CLASS 'CONST'
  260.  _BSS           CLASS 'BSS'
  261.  'Code'         CLASS 'CODE' IOPL
  262.  _TEXT          CLASS 'CODE' IOPL
  263.  RMCode         CLASS 'CODE' IOPL
  264.  SwapCode       CLASS 'CODE' IOPL
  265.  
  266. <<keep
  267.         $(LINK) $(LFLAGS) @<<$(@B).lnk
  268. $(OBJ1) +
  269. $(OBJ2) +
  270. $(OBJ3) +
  271. $(OBJ4)
  272. $*.dmd
  273. $*.map
  274. $(LIBS)
  275. $(DEF02)
  276. <<keep
  277.              $(MAPSYM) $*.map
  278.              trcust $*.tsf
  279.  
  280.  
  281.  
  282. #****************************************************************************
  283.