home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v5.zip / DDKX86 / SRC / PARALLEL / MAKEFILE next >
Text File  |  1995-04-14  |  10KB  |  268 lines

  1. #   Makefile for: PARALLEL
  2. #   (c) International Business Machines Corp. 1990
  3.  
  4. #*****************************************************************************
  5. #  Makefile for the PARALLEL port driver
  6. #
  7. #       SCCSID = @(#)makefile   6.7 91/10/07
  8. #
  9. #       IBM Confidential
  10. #
  11. #       Copyright (c) IBM Corporation 1987, 1989
  12. #
  13. #       All Rights Reserved
  14. #
  15. #
  16. #       PARALLEL Makefile
  17. #
  18. #******************************************************************************
  19.  
  20. #******************************************************************************
  21. #                       M R I   I N F O R M A T I O N
  22. #******************************************************************************
  23. #
  24. # This makefile contains a template for creating a makefile with the
  25. # MRI versions generation a part of it.
  26. #
  27. # It is our contention to eliminate having a makefile for both the source
  28. # tree and one for each of the MRI trees. This makefile will show how to
  29. # combine the two together and create a single makefile that will handle
  30. # both the source and MRI parts.  If it is necessary to have a separate
  31. # makefile for the MRI trees then it should reside in the parent source
  32. # tree directory.
  33. #
  34. #****************************************************************************
  35. #           E N D     O F     M R I     I N F O R M A T I O N
  36. #****************************************************************************
  37.  
  38. # This is a makefile template to be used for an OS/2 Component makefile.
  39. # The purpose of this template is to outline all the areas and items
  40. # that need to be covered. The following are some of those items
  41. #
  42. #     Handle Non Specific Machine Layouts - This will make the makefile
  43. #     -----------------------------------   more generic and portable
  44. #                                           regardless of the development
  45. #                                           tree. Macros should have
  46. #                                           relative paths to information
  47. #                                           in order for the makefiles to be
  48. #                                           more portable.
  49. #
  50. #
  51. #     National Language Support          -  The makefile will have to
  52. #     -------------------------             support all national language
  53. #                                           versions.  This applies to all
  54. #                                           modules that will contain trans-
  55. #                                           lations even if that translation
  56. #                                           is not the result of specific MRI
  57. #                                           which is part of the component.
  58. #
  59. #     Environment Setup                   - The makefile will setup the
  60. #     -----------------                     environment (ie. paths to tools,
  61. #                                           etc). This will insure that
  62. #                                           people involved can use the
  63. #                                           makefile without worrying
  64. #                                           about their local environment.
  65. #
  66. #     Use of Inline Response Files        - The makefile will dynamically
  67. #     ----------------------------          generate linker response files,
  68. #                                           def files etc. to support NLS,
  69. #                                           MMIO and other build variations.
  70. #
  71. # The following is a list of the order in which the makefile should be written.
  72. #
  73. #     Dot Directives - ie.
  74. #        .SUFFIXES:
  75. #        .SILENT:
  76. #        .IGNORE:
  77. #        .PRECIOUS:
  78. #
  79. #     Environment Setup
  80. #        Conditional setup and user defined macros
  81. #        Compiler Location w/ includes, libs and tools etc.
  82. #        Compiler/tools Macros
  83. #        Compiler/tools Options
  84. #        Additional user defined macros
  85. #
  86. #      Rules for Compiling and assembling
  87. #        .c.obj
  88. #        .asm.obj
  89. #        .exe.com
  90. #
  91. #      Common target information "common.mak" for dependency generation and
  92. #      nls processing
  93. #
  94. #      User Target Information
  95. #         all
  96. #         debug
  97. #
  98. #      Specific Description Blocks
  99. #
  100. #      Description block for dynamic dependencies generation "depend.mak"
  101. #
  102. #      Indirect Dependencies for SOURCE "depend.mak"
  103. #         .obj:   .c .h .inc
  104. #
  105. # It is very important to have the makefile in the above order to make both
  106. # the developers job and the build departments job that much easier.
  107. #
  108. # ******  NOTE  ******
  109. #
  110. #   Please make sure that the MAKEFILE is documented. There have been many
  111. #   occasions that someone other then people working on your component have
  112. #   had a chance to inquire about what the dependencies are and what files
  113. #   are created as a result.
  114. #
  115. #   The makefile should be a document in itself. It will describe how to
  116. #   to create the component. It is VERY inportant that any special
  117. #   consideration be documented. The following is an example of a problem
  118. #   and its documentation.
  119. #
  120. #        If you are using a SED command with TAB characters, many editors
  121. #        will expand tabs causing unpredictable results in other programs.
  122. #
  123. #        Documentation:
  124. #
  125. #        Using SED command with TABS. Besure to invoke set tab save option
  126. #        on your editor. If you don't, the program 'xyz' will not work
  127. #        correctly.
  128. #
  129.  
  130. #****************************************************************************
  131. #  Dot directive definition area (usually just suffixes)
  132. #****************************************************************************
  133.  
  134. .SUFFIXES: .exe .asm .def .lnk .lib .obj .lst .c .rc .res
  135.  
  136. #****************************************************************************
  137. #  Environment Setup for the component(s).
  138. #****************************************************************************
  139.  
  140. #
  141. # Conditional Setup Area and User Defined Macros
  142. #
  143.  
  144. #
  145. #   Define macro for language. If the language macro is not defined, the
  146. #   default language is US.
  147. #
  148.  
  149. !ifndef LANG
  150. LANG=us
  151. !endif
  152.  
  153. #
  154. # Compiler Location w/ includes, libs and tools
  155. #
  156.  
  157. MRI        = mri
  158. MRIPATH    = ..\..\$(MRI)\parallel
  159. ICONPATH   = ..\..\$(MRI)\icons
  160. H          = ..\..\h
  161. IBMH       = ..\..\ibmh;..\..\ibmc\cinclude;..\..\h
  162. LIBPath    = ..\..\lib
  163. IBMLIB     = ..\..\ibmc\clib
  164. LIB386Path = ..\..\lib386
  165. INC        = ..\..\inc
  166. TOOLSPATH  = ..\..\tools;..\..\ibmc\cbin
  167. DPATH      = ..\..\$(MRI)\txt;$(DPATH)
  168.  
  169. #
  170. # Since the compiler/linker and other tools use environment
  171. # variables ( INCLUDE, LIB, etc ) in order to get the location of files,
  172. # the following line will check the environment for the LIFE of the
  173. # makefile and will be specific to this set of instructions. All MAKEFILES
  174. # are requested to use this format to insure that they are using the correct
  175. # level of files and tools.
  176. #
  177.  
  178. !if [set INCLUDE=$(IBMH);] || \
  179.     [set LIB=$(LIB386Path);$(LIBPath)] || \
  180.     [set PATH=$(TOOLSPATH)]
  181. !endif
  182.  
  183. OBJS       = parallel.obj
  184.  
  185. TARGETS    = parallel.p$(LANG) $(MRIPATH)\parallel.res
  186. LIBLIST    = $(LIBPath)\os2386.lib \
  187.              $(IBMLIB)\dde4nbs.lib
  188.  
  189. CC         = icc
  190. ICCFLAGS   =  /Ss /Rn /Gm- /Gd- /Ge- /Ms /C+ /Fm /O+ /Yp+ .\$*.c
  191. CINC       = -I$(MAKEDIR)
  192. LINK       = link386
  193. LFLAGS     = /PACKCODE /PACKDATA /EXEPACK /ALIGN:4 /M:FULL +
  194.  
  195. .c.obj:
  196.         $(CC) $(CINC) $(DEFINES) $(ICCFLAGS) -c $<
  197.  
  198. #****************************************************************************
  199. #   Target Information
  200. #****************************************************************************
  201. #
  202. # This is a very important step. The following small amount of code MUST
  203. # NOT be removed from the program. The following directive will do
  204. # dependency checking every time this component is built UNLESS the
  205. # following is performed:
  206. #                    A specific tag is used -- ie. all
  207. #
  208. # This allows the developer as well as the B & I group to perform incremental
  209. # build with a degree of accuracy that has not been used before.
  210. # There are some instances where certain types of INCLUDE files must be
  211. # created first. This type of format will allow the developer to require
  212. # that file to be created first. In order to achive that, all that has to
  213. # be done is to make the DEPEND.MAK tag have your required target. Below is
  214. # an example:
  215. #
  216. #    depend.mak:   { your file(s) } dephold
  217. #
  218. # Please DON'T remove the following line
  219. #
  220.  
  221. !include      "$(H)\version.mak"
  222.  
  223. #
  224. # Include a makefile with all the information about MRI Codepage, Language,
  225. # and Country for IPFC.
  226. #
  227.  
  228. !include "$(H)\preipfc.mak"
  229.  
  230. #
  231. # Should be the default tag for all general processing
  232. #
  233.  
  234. all: $(TARGETS)
  235.  
  236. clean:
  237.     del *.obj *.res *.dll *.sof *.sc *.ih *.map *.sym *.lib
  238.  
  239. # Building parallel.pdr
  240.  
  241. parallel.p$(LANG): $(OBJS) $(LIBLIST) $(MRIPATH)\parallel.res makefile
  242.          Rem Create DEF file <<parallel.def
  243. LIBRARY PARALLEL
  244. DESCRIPTION '$(FILEVER) Parallel Port Library'
  245. PROTMODE
  246. DATA MULTIPLE NONSHARED LOADONCALL
  247. CODE LOADONCALL
  248. EXPORTS
  249.    SplPdEnumPort
  250.    SplPdInitPort
  251.    SplPdInstallPort
  252.    SplPdGetPortIcon
  253.    SplPdQueryPort
  254.    SplPdSetPort
  255.    SplPdRemovePort
  256.    SplPdTermPort
  257. <<keep
  258.          $(LINK) $(LFLAGS) $(OBJS),$@,,$(LIBLIST),$*;
  259.          rc $(MRIPATH)\parallel.res parallel.p$(LANG)
  260.          mapsym parallel
  261.  
  262. $(MRIPATH)\parallel.res: $(MRIPATH)\parallel.rc $(MRIPATH)\parallel.dlg \
  263.                          $(ICONPATH)\parallel.ico
  264.           copy $(ICONPATH)\parallel.ico $(MAKEDIR)
  265.           rc -r $(MRIPATH)\parallel.rc $(MRIPATH)\parallel.res
  266.  
  267. #****************************************************************************
  268.