home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / source / util2src / makefile < prev    next >
Encoding:
Makefile  |  1993-10-04  |  11.8 KB  |  499 lines

  1. #==============================================================================
  2. # makefile - For the 'util' directory.
  3. #
  4. # (C) Copyright IBM Corporation, 1992, 1993                     Brian E. Yoder
  5. #
  6. # 04/03/91 - Created.
  7. # 07/22/92 - Build using C Set/2 1.0 (and the make.exe from IBM C/2 1.1).
  8. # 09/22/92 - Latest version.
  9. # 11/11/92 - Add os2386.lib to get access to DOS16FIND* functions. Early
  10. #            versions of OS/2 2.0's HPFS.IFS had 32-bit file-find problems.
  11. # 09/28/93 - Build using OS/2 2.1 toolkit and C-Set/2 1.0. I installed C-Set/2
  12. #            using 2 migration libraries: single-threaded static link, and
  13. #            multi-threaded dynamic link. For whatever reason, when linking
  14. #            a program with setargv, I now must specify the /NOE flag.
  15. # 10/04/93 - Bind the C Set/2 run-time message library to each executable
  16. #            using the msgbind utility from the OS/2 2.1 toolkit.
  17. #==============================================================================
  18.  
  19. #==============================================================================
  20. # The default is to make all programs
  21. #==============================================================================
  22.  
  23. default: ALL
  24.  
  25. ALL:           util.lib       \
  26.                args.exe       \
  27.                argx.exe       \
  28.                bmtbl.exe      \
  29.                ccmt.exe       \
  30.                ccp.exe        \
  31.                cdir.exe       \
  32.                cfdmp.exe      \
  33.                chmod.exe      \
  34.                crc.exe        \
  35.                crcchk.exe     \
  36.                du.exe         \
  37.                ftest.exe      \
  38.                grep.exe       \
  39.                list2bm.exe    \
  40.                ls.exe         \
  41.                pmt.exe        \
  42.                t2bm.exe       \
  43.                tlbuf.exe
  44.  
  45.  
  46. #------------------------------------------------------------------------------
  47. # Common definitions
  48. #------------------------------------------------------------------------------
  49.  
  50. UTILH   = util.h
  51.  
  52. UTILLIB = util.lib
  53.  
  54. UTILDEF = util.def
  55.  
  56. #------------------------------------------------------------------------------
  57. # Compiler and linker options
  58. #------------------------------------------------------------------------------
  59.  
  60. CFLAGS = -C+ -Sm -O+ -Ss+ -Q+
  61. CC     = icc
  62.  
  63. LFLAGS = /AL:4 /EXEPACK /BASE:0x10000 /MAP /STACK:16000 /NOL
  64. LINK   = link386
  65.  
  66. SETARG = c:\ibmc\lib\setargv.obj
  67.  
  68. MSGF   = c:\ibmc\help\dde4.msg
  69.  
  70. #==============================================================================
  71. # Library: util.lib
  72. #==============================================================================
  73.  
  74. OBJ_LIB      = cfaccess.obj   \
  75.                text2bm.obj    \
  76.                rxpm.obj       \
  77.                futil.obj      \
  78.                makepath.obj   \
  79.                crcfile.obj    \
  80.                speclist.obj   \
  81.                lbuf.obj
  82.  
  83. util.lib:      $(OBJ_LIB)
  84.                echo Deleting old .lib file if present...
  85.                if exist util.lib del util.lib
  86.                echo Building library...
  87.                lib @<<
  88. util.lib
  89. y
  90. +cfaccess+rxpm+text2bm+futil+makepath+crcfile+speclist+lbuf
  91. util.ref
  92. <<
  93.  
  94. #==============================================================================
  95. # args - Test program to display command line arguments
  96. #==============================================================================
  97.  
  98. args.exe     : args.obj  util.def
  99.                $(LINK) $(LFLAFS) @<<
  100. args
  101. args.exe
  102. args.map
  103. ,
  104. $(UTILDEF);
  105. <<
  106.                msgbind <<
  107. >args.exe
  108. <$(MSGF)
  109. *
  110. <<
  111.  
  112. #==============================================================================
  113. # argx - Test program:  Display args with OS's filename expansion
  114. #==============================================================================
  115.  
  116. argx.exe     : args.obj  $(UTILDEF)
  117.                $(LINK) $(LFLAFS) /NOE @<<
  118. args+
  119. $(SETARG)
  120. argx.exe
  121. argx.map
  122. ,
  123. $(UTILDEF);
  124. <<
  125.                msgbind <<
  126. >argx.exe
  127. <$(MSGF)
  128. *
  129. <<
  130.  
  131. #==============================================================================
  132. # bmtbl - Build a BookMaster table definition
  133. #==============================================================================
  134.  
  135. bmtbl.exe    : bmtbl.obj     \
  136.                $(UTILLIB)    \
  137.                $(UTILDEF)
  138.                $(LINK) $(LFLAFS) @<<
  139. bmtbl.obj
  140. bmtbl.exe
  141. bmtbl.map
  142. $(UTILLIB)+os2386.lib
  143. $(UTILDEF);
  144. <<
  145.                msgbind <<
  146. >bmtbl.exe
  147. <$(MSGF)
  148. *
  149. <<
  150.  
  151. #==============================================================================
  152. # ccmt - C Comment Checking
  153. #==============================================================================
  154.  
  155. ccmt.exe     : ccmt.obj   \
  156.                $(UTILDEF)
  157.                $(LINK) $(LFLAFS) /NOE @<<
  158. ccmt+
  159. $(SETARG)
  160. ccmt.exe
  161. ccmt.map
  162. ,
  163. $(UTILDEF);
  164. <<
  165.                msgbind <<
  166. >ccmt.exe
  167. <$(MSGF)
  168. *
  169. <<
  170.  
  171. #==============================================================================
  172. # ccp - Conditional Copy
  173. #==============================================================================
  174.  
  175. ccp.exe      : ccp.obj       \
  176.                $(UTILLIB)    \
  177.                $(UTILDEF)
  178.                $(LINK) $(LFLAFS) @<<
  179. ccp.obj
  180. ccp.exe
  181. ccp.map
  182. $(UTILLIB)+os2386.lib
  183. $(UTILDEF);
  184. <<
  185.                msgbind <<
  186. >ccp.exe
  187. <$(MSGF)
  188. *
  189. <<
  190.  
  191. #==============================================================================
  192. # cdir - Change directory
  193. #==============================================================================
  194.  
  195. cdir.exe     : cdir.obj      \
  196.                $(UTILLIB)    \
  197.                $(UTILDEF)
  198.                $(LINK) $(LFLAFS) @<<
  199. cdir.obj
  200. cdir.exe
  201. cdir.map
  202. $(UTILLIB)+os2386.lib
  203. $(UTILDEF);
  204. <<
  205.                msgbind <<
  206. >cdir.exe
  207. <$(MSGF)
  208. *
  209. <<
  210.  
  211. #==============================================================================
  212. # cfdmp - Customization file dump (test functions in cfaccess.c)
  213. #==============================================================================
  214.  
  215. cfdmp.exe    : cfdmp.obj  cfaccess.obj  $(UTILDEF)
  216.                $(LINK) $(LFLAFS) @<<
  217. cfdmp+
  218. cfaccess
  219. cfdmp.exe
  220. cfdmp.map
  221. ,
  222. $(UTILDEF);
  223. <<
  224.                msgbind <<
  225. >cfdmp.exe
  226. <$(MSGF)
  227. *
  228. <<
  229.  
  230. #==============================================================================
  231. # chmod - Change file mode
  232. #==============================================================================
  233.  
  234. chmod.exe    : chmod.obj     \
  235.                $(UTILLIB)    \
  236.                $(UTILDEF)
  237.                $(LINK) $(LFLAFS) @<<
  238. chmod.obj
  239. chmod.exe
  240. chmod.map
  241. $(UTILLIB)+os2386.lib
  242. $(UTILDEF);
  243. <<
  244.                msgbind <<
  245. >chmod.exe
  246. <$(MSGF)
  247. *
  248. <<
  249.  
  250. #==============================================================================
  251. # crc - Calculate CRC for file(s)
  252. #==============================================================================
  253.  
  254. crc.exe      : crc.obj       \
  255.                $(UTILLIB)    \
  256.                $(UTILDEF)
  257.                $(LINK) $(LFLAFS) @<<
  258. crc.obj
  259. crc.exe
  260. crc.map
  261. $(UTILLIB)+os2386.lib
  262. $(UTILDEF);
  263. <<
  264.                msgbind <<
  265. >crc.exe
  266. <$(MSGF)
  267. *
  268. <<
  269.  
  270. #==============================================================================
  271. # crcchk - Calculate and check CRC for file(s)
  272. #==============================================================================
  273.  
  274. crcchk.exe   : crcchk.obj    \
  275.                $(UTILLIB)    \
  276.                $(UTILDEF)
  277.                $(LINK) $(LFLAFS) @<<
  278. crcchk.obj
  279. crcchk.exe
  280. crcchk.map
  281. $(UTILLIB)+os2386.lib
  282. $(UTILDEF);
  283. <<
  284.                msgbind <<
  285. >crcchk.exe
  286. <$(MSGF)
  287. *
  288. <<
  289.  
  290. #==============================================================================
  291. # du - Display file space usage
  292. #==============================================================================
  293.  
  294. du.exe       : du.obj        \
  295.                $(UTILLIB)    \
  296.                $(UTILDEF)
  297.                $(LINK) $(LFLAFS) @<<
  298. du.obj
  299. du.exe
  300. du.map
  301. $(UTILLIB)+os2386
  302. $(UTILDEF);
  303. <<
  304.                msgbind <<
  305. >du.exe
  306. <$(MSGF)
  307. *
  308. <<
  309.  
  310. #==============================================================================
  311. # ftest - Test various file functions
  312. #==============================================================================
  313.  
  314. ftest.exe    : ftest.obj    \
  315.                $(UTILLIB)   \
  316.                $(UTILDEF)
  317.                $(LINK) $(LFLAFS) @<<
  318. ftest.obj
  319. ftest.exe
  320. ftest.map
  321. $(UTILLIB)+os2386.lib
  322. $(UTILDEF);
  323. <<
  324.                msgbind <<
  325. >ftest.exe
  326. <$(MSGF)
  327. *
  328. <<
  329.  
  330. #==============================================================================
  331. # grep - Get regular expression and print
  332. #==============================================================================
  333.  
  334. grep.exe     : grep.obj     \
  335.                $(UTILLIB)   \
  336.                $(UTILDEF)
  337.                $(LINK) $(LFLAFS) @<<
  338. grep.obj
  339. grep.exe
  340. grep.map
  341. $(UTILLIB)+os2386.lib
  342. $(UTILDEF);
  343. <<
  344.                msgbind <<
  345. >grep.exe
  346. <$(MSGF)
  347. *
  348. <<
  349.  
  350. #==============================================================================
  351. # list2bm - Convert list of files to a BookMaster source document
  352. #==============================================================================
  353.  
  354. list2bm.exe  : list2bm.obj   \
  355.                $(UTILLIB)    \
  356.                $(UTILDEF)
  357.                $(LINK) $(LFLAFS) @<<
  358. list2bm.obj
  359. list2bm.exe
  360. list2bm.map
  361. $(UTILLIB)+os2386.lib
  362. $(UTILDEF);
  363. <<
  364.                msgbind <<
  365. >list2bm.exe
  366. <$(MSGF)
  367. *
  368. <<
  369.  
  370. #==============================================================================
  371. # ls - List directory
  372. #==============================================================================
  373.  
  374. ls.exe       : ls.obj        \
  375.                $(UTILLIB)    \
  376.                $(UTILDEF)
  377.                $(LINK) $(LFLAFS) @<<
  378. ls.obj
  379. ls.exe
  380. ls.map
  381. $(UTILLIB)+os2386
  382. $(UTILDEF);
  383. <<
  384.                msgbind <<
  385. >ls.exe
  386. <$(MSGF)
  387. *
  388. <<
  389.  
  390. #==============================================================================
  391. # pmt - Pattern matching test, for functions in rxpm.c
  392. #==============================================================================
  393.  
  394. pmt.exe      : pmt.obj  rxpm.obj  util.def
  395.                $(LINK) $(LFLAFS) /NOE @<<
  396. pmt+
  397. rxpm+
  398. $(SETARG)
  399. pmt.exe
  400. pmt.map
  401. ,
  402. $(UTILDEF);
  403. <<
  404.                msgbind <<
  405. >pmt.exe
  406. <$(MSGF)
  407. *
  408. <<
  409.  
  410. #==============================================================================
  411. # t2bm - Text to BookMaster conversion
  412. #==============================================================================
  413.  
  414. t2bm.exe     : t2bm.obj      \
  415.                $(UTILLIB)    \
  416.                $(UTILDEF)
  417.                $(LINK) $(LFLAFS) @<<
  418. t2bm.obj
  419. t2bm.exe
  420. t2bm.map
  421. $(UTILLIB)+os2386.lib
  422. $(UTILDEF);
  423. <<
  424.                msgbind <<
  425. >t2bm.exe
  426. <$(MSGF)
  427. *
  428. <<
  429.  
  430. #==============================================================================
  431. # tlbuf - Test for lbuf.c functions
  432. #==============================================================================
  433.  
  434. tlbuf.exe    : tlbuf.obj     \
  435.                $(UTILLIB)    \
  436.                $(UTILDEF)
  437.                $(LINK) $(LFLAFS) @<<
  438. tlbuf.obj
  439. tlbuf.exe
  440. tlbuf.map
  441. $(UTILLIB)+os2386.lib
  442. $(UTILDEF);
  443. <<
  444.                msgbind <<
  445. >tlbuf.exe
  446. <$(MSGF)
  447. *
  448. <<
  449.  
  450. #==============================================================================
  451. # Additional object file dependencies
  452. #==============================================================================
  453.  
  454. bmtbl.obj    : $(UTILH)  bmtbl.h
  455.  
  456. ccp.obj      : $(UTILH)
  457.  
  458. cdir.obj     : $(UTILH)
  459.  
  460. cfaccess.obj : $(UTILH)
  461.  
  462. cfdmp.obj    : $(UTILH)
  463.  
  464. chmod.obj    : $(UTILH)
  465.  
  466. crc.obj      : $(UTILH)
  467.  
  468. crcchk.obj   : $(UTILH)
  469.  
  470. crcfile.obj  : $(UTILH)
  471.  
  472. du.obj       : $(UTILH)
  473.  
  474. ftest.obj    : $(UTILH)
  475.  
  476. futil.obj    : $(UTILH)
  477.  
  478. grep.obj     : $(UTILH)
  479.  
  480. lbuf.obj     : $(UTILH)
  481.  
  482. list2bm.obj  : $(UTILH)
  483.  
  484. ls.obj       : $(UTILH)
  485.  
  486. makepath.obj : $(UTILH)
  487.  
  488. pmt.obj      : $(UTILH)
  489.  
  490. rxpm.obj     : $(UTILH)  regexp.h
  491.  
  492. speclist.obj : $(UTILH)
  493.  
  494. t2bm.obj     : $(UTILH)
  495.  
  496. text2bm.obj  : $(UTILH)
  497.  
  498. tlbuf.obj    : $(UTILH)
  499.