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

  1. #/****************************************************************************/
  2. #/*                                                                          */
  3. #/* Driver Name: IBMIDECD.ADD - Adapter Driver for ATAPI CD-ROMs             */
  4. #/*              ------------------------------------------------            */
  5. #/*                                                                          */
  6. #/* Source File Name: MAKEFILE                                               */
  7. #/*                                                                          */
  8. #/* Descriptive Name: MAKEFILE for IBMIDECD.ADD                              */
  9. #/*                                                                          */
  10. #/*--------------------------------------------------------------------------*/
  11. #/*                                                                          */
  12. #/* Copyright : COPYRIGHT IBM CORPORATION, 1993, 1994                        */
  13. #/*             LICENSED MATERIAL - PROGRAM PROPERTY OF IBM                  */
  14. #/*             REFER TO COPYRIGHT INSTRUCTION FORM#G120-2083                */
  15. #/*             RESTRICTED MATERIALS OF IBM                                  */
  16. #/*             IBM CONFIDENTIAL                                             */
  17. #/*                                                                          */
  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. #/* CHANGE ACTIVITY =                                                        */
  35. #/*     DATE       FLAG     DEFECT           CHANGE DESCRIPTION              */
  36. #/*   --------  ----------  ------  --------------------------------------   */
  37. #/*   mm/dd/yy  @Vdefect    ######  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx   */
  38. #/*                                                                          */
  39. #/*   01/23/95  @110138     110138  remove debug option
  40. #/*                                                                          */
  41. #/****************************************************************************/
  42. #
  43. #
  44. #       You can optionally generate the listing files for the device driver.
  45. #
  46. #          make  [option]
  47. #
  48. #            option:     list            -> create listings
  49. #                        ibmidecd.flt    -> create Retail IDE CD-ROM filter
  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 .flt .exe .obj .asm .inc .def .lnk .lrf .crf .ref
  69. .SUFFIXES: .lst .sym .map .c .h .lib .cod .flt
  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. DHLIB  = ..\..\devhelp
  92. ADDLIB  = ..\..\addcalls
  93. CDROM = ..\os2cdrom
  94. RMLIB  = ..\..\..\resource\rmcalls
  95. RSM_H  = ..\..\..\resource\rsm_h
  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=$(DOSINC);$(INIT);$(TASK);$(INC);$(CDROM)] || \
  107.    [set LIB=$(LIB);$(DHLIB);$(RMLIB);$(ADDLIB);$(DISKH)] || [set PATH=$(TOOLSPATH)]
  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$(DOSINC) -I$(INIT) -I$(TASK) -I$(INC)
  130. CINC   = -I. -I$(H) -I$(DISKH) -I$(MAKEDIR) -I$(RSM_H)
  131. CFLAGS = /c /Zp /G2s /Answ $(ENV)
  132. LFLAGS = /map /nod /exepack /packd /a:16 /far
  133. RFLAGS = -r
  134.  
  135. LIBS  =  $(DHLIB)\dhcalls.lib $(ADDLIB)\addcalls.lib $(LIB)\libh.lib $(RMLIB)\rmcalls.lib
  136. DEF02 =  IBMIDECD.def
  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. #
  147. OBJ1 =  ATAPISEG.OBJ ATAPIISM.OBJ ATAPIOSM.OBJ ATAPIGEN.OBJ ATAPIDAT.OBJ
  148. OBJ2 =  ATAPIORB.OBJ
  149. OBJ3 =  ATAPInit.OBJ PRINTF.OBJ
  150.  
  151. #
  152. #       LIST Files
  153. #
  154. LIST=   ATAPISEG.LST ATAPIISM.LST ATAPIOSM.LST ATAPIGEN.LST ATAPIDAT.LST \
  155.         ATAPIORB.LST ATAPINIT.LST PRINTF.LST   DPRINTF.LST
  156.  
  157. OBJS = $(OBJ1) $(OBJ2) $(OBJ3)
  158.  
  159. #****************************************************************************
  160. #   Setup the inference rules for compiling and assembling source code to
  161. #   obejct code.
  162. #****************************************************************************
  163.  
  164.  
  165. .asm.obj:
  166.         $(AS) $(AFLAGS) $(AINC) $*.asm;
  167.  
  168. .asm.lst:
  169.         $(AS) -l -n $(AFLAGS) $(AINC) $*.asm;
  170.  
  171. .c.obj:
  172.         $(CC) $(CFLAGS) $(CINC) $*.c
  173.  
  174. .c.lst:
  175.         $(CC) $(CFLAGS) /Fc $(CINC) $*.c
  176.         copy $*.cod $*.lst
  177.         del $*.cod
  178.  
  179.  
  180. #****************************************************************************
  181. #   Target Information
  182. #****************************************************************************
  183. #
  184. # This is a very important step. The following small amount of code MUST
  185. # NOT be removed from the program. The following directive will do
  186. # dependency checking every time this component is built UNLESS the
  187. # following is performed:
  188. #                    A specific tag is used -- ie. all
  189. #
  190. # This allows the developer as well as the B & I group to perform incremental
  191. # build with a degree of accuracy that has not been used before.
  192. # There are some instances where certain types of INCLUDE files must be
  193. # created first. This type of format will allow the developer to require
  194. # that file to be created first. In order to achive that, all that has to
  195. # be done is to make the DEPEND.MAK tag have your required target. Below is
  196. # an example:
  197. #
  198. #    depend.mak:   { your file(s) } dephold
  199. #
  200. # Please DON'T remove the following line
  201. #
  202.  
  203. !include      "$(H)\version.mak"
  204.  
  205. #
  206. # Should be the default tag for all general processing
  207. #
  208.  
  209. all:   IBMIDECD.FLT
  210.  
  211. list: $(LIST)
  212.  
  213. clean:
  214.         if exist *.lnk  del *.lnk
  215.         if exist *.obj  del *.obj
  216.         if exist *.map  del *.map
  217.         if exist *.old  del *.old
  218.         if exist *.lst  del *.lst
  219.         if exist *.lsd  del *.lsd
  220.         if exist *.sym  del *.sym
  221.         if exist *.sys  del *.sys
  222.         if exist *.add  del *.add
  223.         if exist *.flt  del *.flt
  224.         if exist *.tff  del *.tff
  225.         if exist *.def  del *.def
  226.  
  227.  
  228. #*****************************************************************************
  229. #   Specific Description Block Information
  230. #*****************************************************************************
  231.  
  232. # This section would only be for specific direction as to how to create
  233. # unique elements that are necessary to the build process. This could
  234. # be compiling or assembling, creation of DEF files and other unique
  235. # files.
  236. # If all compiler and assembly rules are the same, use an inference rule to
  237. # perform the compilation.
  238. #
  239.  
  240. IBMIDECD.FLT:  $(OBJS) $(LIBS) makefile
  241.         rem Create DEF file <<$(DEF02)
  242. LIBRARY IBMIDECD
  243.  
  244. DESCRIPTION "$(FILEVER)  Adapter Driver for ATAPI CD-ROMs"
  245.  
  246. PROTMODE
  247.  
  248. SEGMENTS
  249.  DDHeader       CLASS 'DATA'
  250.  LIBDATA        CLASS 'DATA'
  251.  _DATA          CLASS 'DATA'
  252.  CONST          CLASS 'CONST'
  253.  _BSS           CLASS 'BSS'
  254.  'Code'         CLASS 'CODE' IOPL
  255.  LIBCODE        CLASS 'CODE' IOPL
  256.  _TEXT          CLASS 'CODE' IOPL
  257.  'RMCode'       CLASS 'CODE' IOPL
  258.  
  259. <<keep
  260.         $(LINK) $(LFLAGS) @<<$(@B).lnk
  261. $(OBJ1) +
  262. $(OBJ2) +
  263. $(OBJ3)
  264. $*.FLT
  265. $*.map
  266. $(LIBS)
  267. $(DEF02)
  268. <<keep
  269.              $(MAPSYM) $*.map
  270.  
  271. #****************************************************************************
  272.