home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / source / util2src / makefile.32 < prev    next >
Encoding:
Makefile  |  1992-09-21  |  9.4 KB  |  370 lines

  1. #==============================================================================
  2. # makefile - For the 'util' directory.
  3. #
  4. # (C) Copyright IBM Corporation, 1992.                          Brian E. Yoder
  5. #
  6. # 04/03/91 - Created.
  7. # 07/22/92 - Build using C Set/2 (and the make.exe from IBM C/2 1.1).
  8. # 09/22/92 - Latest version.
  9. #==============================================================================
  10.  
  11. #==============================================================================
  12. # The default is to make all programs
  13. #
  14. # There should be one program listed for every .LNK link response file in
  15. # this directory.
  16. #==============================================================================
  17.  
  18. default: ALL
  19.  
  20. ALL:           util.lib       \
  21.                args.exe       \
  22.                argx.exe       \
  23.                bmtbl.exe      \
  24.                ccmt.exe       \
  25.                ccp.exe        \
  26.                cdir.exe       \
  27.                cfdmp.exe      \
  28.                chmod.exe      \
  29.                crc.exe        \
  30.                crcchk.exe     \
  31.                ftest.exe      \
  32.                grep.exe       \
  33.                list2bm.exe    \
  34.                ls.exe         \
  35.                pmt.exe        \
  36.                t2bm.exe
  37.  
  38.  
  39. #------------------------------------------------------------------------------
  40. # Common definitions
  41. #------------------------------------------------------------------------------
  42.  
  43. UTILH   = util.h
  44.  
  45. UTILLIB = util.lib
  46.  
  47. UTILDEF = util.def
  48.  
  49. #------------------------------------------------------------------------------
  50. # Compiler and linker options
  51. #------------------------------------------------------------------------------
  52.  
  53. CFLAGS = -C+ -Sm -O+ -Ss+ -Q+
  54. CC     = icc
  55.  
  56. LFLAGS = /AL:4 /EXEPACK /BASE:0x10000 /MAP /STACK:16000 /NOL
  57. LINK   = link386
  58.  
  59. SETARG = c:\ibmc\lib\setargv.obj
  60.  
  61. #==============================================================================
  62. # Library: util.lib
  63. #
  64. # When adding object modules to the library:
  65. # 1. Add them to the OBJ_LIB list, and:
  66. # 2. Add them to the "util.rsp" LIB response file.
  67. #==============================================================================
  68.  
  69. OBJ_LIB      = cfaccess.obj   \
  70.                text2bm.obj    \
  71.                rxpm.obj       \
  72.                futil.obj      \
  73.                makepath.obj   \
  74.                crcfile.obj    \
  75.                speclist.obj
  76.  
  77. util.lib:      $(OBJ_LIB)
  78.                echo Deleting old .lib file if present...
  79.                if exist util.lib del util.lib
  80.                echo Building library...
  81.                lib @<<
  82. util.lib
  83. y
  84. +cfaccess+rxpm+text2bm+futil+makepath+crcfile+speclist
  85. util.ref
  86. <<
  87.  
  88. #==============================================================================
  89. # args - Test program to display command line arguments
  90. #==============================================================================
  91.  
  92. args.exe     : args.obj  util.def
  93.                $(LINK) $(LFLAFS) @<<
  94. args
  95. args.exe
  96. args.map
  97. ,
  98. $(UTILDEF);
  99. <<
  100.  
  101. #==============================================================================
  102. # argx - Test program:  Display args with OS's filename expansion
  103. #==============================================================================
  104.  
  105. argx.exe     : args.obj  util.def
  106.                $(LINK) $(LFLAFS) @<<
  107. args+
  108. $(SETARG)
  109. argx.exe
  110. argx.map
  111. ,
  112. $(UTILDEF);
  113. <<
  114.  
  115. #==============================================================================
  116. # bmtbm - Build a BookMaster table definition
  117. #==============================================================================
  118.  
  119. bmtbl.exe    : bmtbl.obj     \
  120.                $(UTILLIB)    \
  121.                $(UTILDEF)
  122.                $(LINK) $(LFLAFS) @<<
  123. bmtbl.obj
  124. bmtbl.exe
  125. bmtbl.map
  126. $(UTILLIB)
  127. $(UTILDEF);
  128. <<
  129.  
  130. #==============================================================================
  131. # ccmt - C Comment Checking
  132. #==============================================================================
  133.  
  134. ccmt.exe     : ccmt.obj   \
  135.                util.def
  136.                $(LINK) $(LFLAFS) @<<
  137. ccmt+
  138. $(SETARG)
  139. ccmt.exe
  140. ccmt.map
  141. ,
  142. $(UTILDEF);
  143. <<
  144.  
  145. #==============================================================================
  146. # ccp - Conditional Copy
  147. #==============================================================================
  148.  
  149. ccp.exe      : ccp.obj       \
  150.                $(UTILLIB)    \
  151.                $(UTILDEF)
  152.                $(LINK) $(LFLAFS) @<<
  153. ccp.obj
  154. ccp.exe
  155. ccp.map
  156. $(UTILLIB)
  157. $(UTILDEF);
  158. <<
  159.  
  160. #==============================================================================
  161. # cdir - Change directory
  162. #==============================================================================
  163.  
  164. cdir.exe     : cdir.obj      \
  165.                $(UTILLIB)    \
  166.                $(UTILDEF)
  167.                $(LINK) $(LFLAFS) @<<
  168. cdir.obj
  169. cdir.exe
  170. cdir.map
  171. $(UTILLIB)
  172. $(UTILDEF);
  173. <<
  174.  
  175. #==============================================================================
  176. # cfdmp - Customization file dump (test functions in cfaccess.c)
  177. #==============================================================================
  178.  
  179. cfdmp.exe    : cfdmp.obj  cfaccess.obj  util.def
  180.                $(LINK) $(LFLAFS) @<<
  181. cfdmp+
  182. cfaccess
  183. cfdmp.exe
  184. cfdmp.map
  185. ,
  186. $(UTILDEF);
  187. <<
  188.  
  189. #==============================================================================
  190. # chmod - Change file mode
  191. #==============================================================================
  192.  
  193. chmod.exe    : chmod.obj     \
  194.                $(UTILLIB)    \
  195.                $(UTILDEF)
  196.                $(LINK) $(LFLAFS) @<<
  197. chmod.obj
  198. chmod.exe
  199. chmod.map
  200. $(UTILLIB)
  201. $(UTILDEF);
  202. <<
  203.  
  204. #==============================================================================
  205. # crc - Calculate CRC for file(s)
  206. #==============================================================================
  207.  
  208. crc.exe      : crc.obj       \
  209.                $(UTILLIB)    \
  210.                $(UTILDEF)
  211.                $(LINK) $(LFLAFS) @<<
  212. crc.obj
  213. crc.exe
  214. crc.map
  215. $(UTILLIB)
  216. $(UTILDEF);
  217. <<
  218.  
  219. #==============================================================================
  220. # crcchk - Calculate and check CRC for file(s)
  221. #==============================================================================
  222.  
  223. crcchk.exe   : crcchk.obj    \
  224.                $(UTILLIB)    \
  225.                $(UTILDEF)
  226.                $(LINK) $(LFLAFS) @<<
  227. crcchk.obj
  228. crcchk.exe
  229. crcchk.map
  230. $(UTILLIB)
  231. $(UTILDEF);
  232. <<
  233.  
  234. #==============================================================================
  235. # ftest - Test various file functions
  236. #==============================================================================
  237.  
  238. ftest.exe    : ftest.obj  rxpm.obj  futil.obj  makepath.obj \
  239.                speclist.obj  util.def
  240.                $(LINK) $(LFLAFS) @<<
  241. ftest+
  242. rxpm+
  243. futil+
  244. makepath+
  245. speclist
  246. ftest.exe
  247. ftest.map
  248. ,
  249. $(UTILDEF);
  250. <<
  251.  
  252. #==============================================================================
  253. # grep - Get regular expression and print
  254. #==============================================================================
  255.  
  256. grep.exe     : grep.obj     \
  257.                $(UTILLIB)    \
  258.                $(UTILDEF)
  259.                $(LINK) $(LFLAFS) @<<
  260. grep.obj
  261. grep.exe
  262. grep.map
  263. $(UTILLIB)
  264. $(UTILDEF);
  265. <<
  266.  
  267. #==============================================================================
  268. # list2bm - Convert list of files to a BookMaster source document
  269. #==============================================================================
  270.  
  271. list2bm.exe  : list2bm.obj   \
  272.                $(UTILLIB)    \
  273.                $(UTILDEF)
  274.                $(LINK) $(LFLAFS) @<<
  275. list2bm.obj
  276. list2bm.exe
  277. list2bm.map
  278. $(UTILLIB)
  279. $(UTILDEF);
  280. <<
  281.  
  282. #==============================================================================
  283. # ls - List directory
  284. #==============================================================================
  285.  
  286. ls.exe       : ls.obj        \
  287.                $(UTILLIB)    \
  288.                $(UTILDEF)
  289.                $(LINK) $(LFLAFS) @<<
  290. ls.obj
  291. ls.exe
  292. ls.map
  293. $(UTILLIB)
  294. $(UTILDEF);
  295. <<
  296.  
  297. #==============================================================================
  298. # pmt - Pattern matching test, for functions in rxpm.c
  299. #==============================================================================
  300.  
  301. pmt.exe      : pmt.obj  rxpm.obj  util.def
  302.                $(LINK) $(LFLAFS) @<<
  303. pmt+
  304. rxpm+
  305. $(SETARG)
  306. pmt.exe
  307. pmt.map
  308. ,
  309. $(UTILDEF);
  310. <<
  311.  
  312. #==============================================================================
  313. # t2bm - Text to BookMaster conversion
  314. #==============================================================================
  315.  
  316. t2bm.exe     : t2bm.obj      \
  317.                $(UTILLIB)    \
  318.                $(UTILDEF)
  319.                $(LINK) $(LFLAFS) @<<
  320. t2bm.obj
  321. t2bm.exe
  322. t2bm.map
  323. $(UTILLIB)
  324. $(UTILDEF);
  325. <<
  326.  
  327. #==============================================================================
  328. # Additional object file dependencies
  329. #==============================================================================
  330.  
  331. bmtbl.obj    : $(UTILH)  bmtbl.h
  332.  
  333. ccp.obj      : $(UTILH)
  334.  
  335. cdir.obj     : $(UTILH)
  336.  
  337. cfaccess.obj : $(UTILH)
  338.  
  339. cfdmp.obj    : $(UTILH)
  340.  
  341. chmod.obj    : $(UTILH)
  342.  
  343. crc.obj      : $(UTILH)
  344.  
  345. crcchk.obj   : $(UTILH)
  346.  
  347. crcfile.obj  : $(UTILH)
  348.  
  349. ftest.obj    : $(UTILH)
  350.  
  351. futil.obj    : $(UTILH)
  352.  
  353. grep.obj     : $(UTILH)
  354.  
  355. list2bm.obj  : $(UTILH)
  356.  
  357. ls.obj       : $(UTILH)
  358.  
  359. makepath.obj : $(UTILH)
  360.  
  361. pmt.obj      : $(UTILH)
  362.  
  363. rxpm.obj     : $(UTILH)  regexp.h
  364.  
  365. speclist.obj : $(UTILH)
  366.  
  367. t2bm.obj     : $(UTILH)
  368.  
  369. text2bm.obj  : $(UTILH)
  370.