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

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