home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / CURS13_2.ZIP / MAKEFILE.MSC < prev    next >
Text File  |  1989-12-08  |  11KB  |  331 lines

  1. #################################################################
  2. #                PCCURSES                #
  3. # Makefile to generate scurses.lib, ccurses.lib, mcurses.lib,    #
  4. # lcurses.lib for MicroSoft 'C' v.3.0 or v.4.0.            #
  5. #                                #
  6. # This makefile will generate subdirectories and call itself    #
  7. # recursively...                        #
  8. #################################################################
  9. # 1.3:    Release:                    881005    #
  10. #################################################################
  11.  
  12. # The following are the directories where your lib and include files
  13. # will be installed. These need to be edited for your system.
  14.  
  15. LIBDIR=    \usr\lib
  16. INCDIR= \usr\include
  17.  
  18. # General definitions:
  19.  
  20. CFLAGS=        -M$(MODEL) -Ox -W3 -c
  21.  
  22. COBJS=        attrib.obj   beep.obj     border.obj   boxes.obj     \
  23.         charadd.obj  chardel.obj  charget.obj  charins.obj   \
  24.         charpick.obj clrtobot.obj clrtoeol.obj endwin.obj    \
  25.         initscr.obj  linedel.obj  lineins.obj  longname.obj  \
  26.         move.obj     mvcursor.obj newwin.obj   options.obj   \
  27.         overlay.obj  prntscan.obj refresh.obj  scrreg.obj    \
  28.         setmode.obj  setterm.obj  stradd.obj   strget.obj    \
  29.         tabsize.obj  termmisc.obj unctrl.obj   update.obj    \
  30.         winclear.obj windel.obj   winerase.obj winmove.obj   \
  31.         winscrol.obj wintouch.obj
  32.  
  33. ASMOBJS=    cursesio.obj
  34.  
  35. OBJS=        $(COBJS) $(ASMOBJS)
  36.  
  37. CC=        cl
  38.  
  39. CHMOD=        attrib
  40.  
  41. #################################################################
  42. # 'all' is all that can (and usually is) done            #
  43. #################################################################
  44.  
  45. all:        small compact medium large
  46.  
  47. #################################################################
  48. # The following copies the header files to their proper place    #
  49. #################################################################
  50.  
  51. headers:    $(INCDIR)\curses.h $(INCDIR)\curspriv.h
  52.  
  53. $(INCDIR)\curses.h:    curses.h
  54.     $(CHMOD) -r $(INCDIR)\curses.h
  55.     copy curses.h $(INCDIR)\curses.h
  56.     $(CHMOD) +r $(INCDIR)\curses.h
  57.  
  58. $(INCDIR)\curspriv.h:    curspriv.h
  59.     $(CHMOD) -r $(INCDIR)\curspriv.h
  60.     copy curspriv.h $(INCDIR)\curspriv.h
  61.     $(CHMOD) +r $(INCDIR)\curspriv.h
  62.  
  63. #################################################################
  64. # The following will create a subdirectory for each memory    #
  65. # model, and initiate the make:ing in each one.            #
  66. #################################################################
  67.  
  68. #################################################################
  69. # Create work directory if non-existent, go to it, and        #
  70. # perform the job - small model                    #
  71. #################################################################
  72.  
  73. small:        headers            \
  74.         smodel            \
  75.         smodel\farnear.inc    \
  76.         smodel\smalhuge.inc
  77.     (cd    smodel;\
  78.     make  -f ..\makefile.msc $(MAKEFLAGS) "MODEL=s" $(LIBDIR)\scurses.lib;\
  79.     cd    ..)
  80.  
  81. smodel:
  82.     mkdir    smodel
  83.  
  84. smodel\farnear.inc:    nearcall.inc
  85.     copy    nearcall.inc    smodel\farnear.inc
  86.  
  87. smodel\smalhuge.inc:    smaldata.inc
  88.     copy    smaldata.inc    smodel\smalhuge.inc
  89.  
  90. #################################################################
  91. # Create work directory if non-existent, go to it, and        #
  92. # perform the job - compact model                #
  93. #################################################################
  94.  
  95. compact:    headers            \
  96.         cmodel            \
  97.         cmodel\farnear.inc    \
  98.         cmodel\smalhuge.inc
  99.     (cd    cmodel;\
  100.     make  -f ..\makefile.msc $(MAKEFLAGS) "MODEL=c" $(LIBDIR)\ccurses.lib;\
  101.     cd    ..)
  102.  
  103. cmodel:
  104.     mkdir    cmodel
  105.  
  106. cmodel\farnear.inc:    nearcall.inc
  107.     copy    nearcall.inc    cmodel\farnear.inc
  108.  
  109. cmodel\smalhuge.inc:    hugedata.inc
  110.     copy    hugedata.inc    cmodel\smalhuge.inc
  111.  
  112. #################################################################
  113. # Create work directory if non-existent, go to it, and        #
  114. # perform the job - medium model                #
  115. #################################################################
  116.  
  117. medium:        headers            \
  118.         mmodel            \
  119.         mmodel\farnear.inc    \
  120.         mmodel\smalhuge.inc
  121.     (cd    mmodel;\
  122.     make  -f ..\makefile.msc $(MAKEFLAGS) "MODEL=m" $(LIBDIR)\mcurses.lib;\
  123.     cd    ..)
  124.  
  125. mmodel:
  126.     mkdir    mmodel
  127.  
  128. mmodel\farnear.inc:    farcall.inc
  129.     copy    farcall.inc    mmodel\farnear.inc
  130.  
  131. mmodel\smalhuge.inc:    smaldata.inc
  132.     copy    smaldata.inc    mmodel\smalhuge.inc
  133.  
  134. #################################################################
  135. # Create work directory if non-existent, go to it, and        #
  136. # perform the job - large model                    #
  137. #################################################################
  138.  
  139. large:        headers            \
  140.         lmodel            \
  141.         lmodel\farnear.inc    \
  142.         lmodel\smalhuge.inc
  143.     (cd    lmodel;\
  144.     make  -f ..\makefile.msc $(MAKEFLAGS) "MODEL=l" $(LIBDIR)\lcurses.lib;\
  145.     cd    ..)
  146.  
  147. lmodel:
  148.     mkdir    lmodel
  149.  
  150. lmodel\farnear.inc:    farcall.inc
  151.     copy    farcall.inc    lmodel\farnear.inc
  152.  
  153. lmodel\smalhuge.inc:    hugedata.inc
  154.     copy    hugedata.inc    lmodel\smalhuge.inc
  155.  
  156. #################################################################
  157. # Put together the library in file tmp.lib, then copy it to    #
  158. # the appropriate name for the memory model in question, and    #
  159. # delete the temporary file                    #
  160. #################################################################
  161.  
  162. $(LIBDIR)\$(MODEL)curses.lib:    $(OBJS)
  163.     del    tmp.lib
  164.     lib @..\curses.cmd
  165.     $(CHMOD) -r $(LIBDIR)\$(MODEL)curses.lib
  166.     copy    tmp.lib $(LIBDIR)\$(MODEL)curses.lib
  167.     $(CHMOD) +r $(LIBDIR)\$(MODEL)curses.lib
  168.     del    tmp.lib
  169.  
  170. #################################################################
  171. # Commands and dependencies for individual modules        #
  172. #################################################################
  173.  
  174. attrib.obj:    ..\attrib.c ..\curses.h ..\curspriv.h
  175.     $(CC) $(CFLAGS) -Foattrib ..\attrib.c
  176.  
  177. beep.obj:    ..\beep.c ..\curses.h ..\curspriv.h
  178.     $(CC) $(CFLAGS) -Fobeep ..\beep.c
  179.  
  180. border.obj:    ..\border.c ..\curses.h ..\curspriv.h
  181.     $(CC) $(CFLAGS) -Foborder ..\border.c
  182.  
  183. boxes.obj:    ..\boxes.c ..\curses.h ..\curspriv.h
  184.     $(CC) $(CFLAGS) -Foboxes ..\boxes.c
  185.  
  186. charadd.obj:    ..\charadd.c ..\curses.h ..\curspriv.h
  187.     $(CC) $(CFLAGS) -Focharadd ..\charadd.c
  188.  
  189. chardel.obj:    ..\chardel.c ..\curses.h ..\curspriv.h
  190.     $(CC) $(CFLAGS) -Fochardel ..\chardel.c
  191.  
  192. charget.obj:    ..\charget.c ..\curses.h ..\curspriv.h
  193.     $(CC) $(CFLAGS) -Focharget ..\charget.c
  194.  
  195. charins.obj:    ..\charins.c ..\curses.h ..\curspriv.h
  196.     $(CC) $(CFLAGS) -Focharins ..\charins.c
  197.  
  198. charpick.obj:    ..\charpick.c ..\curses.h ..\curspriv.h
  199.     $(CC) $(CFLAGS) -Focharpick ..\charpick.c
  200.  
  201. clrtobot.obj:    ..\clrtobot.c ..\curses.h ..\curspriv.h
  202.     $(CC) $(CFLAGS) -Foclrtobot ..\clrtobot.c
  203.  
  204. clrtoeol.obj:    ..\clrtoeol.c ..\curses.h ..\curspriv.h
  205.     $(CC) $(CFLAGS) -Foclrtoeol ..\clrtoeol.c
  206.  
  207. endwin.obj:    ..\endwin.c ..\curses.h ..\curspriv.h
  208.     $(CC) $(CFLAGS) -Foendwin ..\endwin.c
  209.  
  210. initscr.obj:    ..\initscr.c ..\curses.h ..\curspriv.h
  211.     $(CC) $(CFLAGS) -Foinitscr ..\initscr.c
  212.  
  213. linedel.obj:    ..\linedel.c ..\curses.h ..\curspriv.h
  214.     $(CC) $(CFLAGS) -Folinedel ..\linedel.c
  215.  
  216. lineins.obj:    ..\lineins.c ..\curses.h ..\curspriv.h
  217.     $(CC) $(CFLAGS) -Folineins ..\lineins.c
  218.  
  219. longname.obj:    ..\longname.c ..\curses.h ..\curspriv.h
  220.     $(CC) $(CFLAGS) -Folongname ..\longname.c
  221.  
  222. move.obj:    ..\move.c ..\curses.h ..\curspriv.h
  223.     $(CC) $(CFLAGS) -Fomove ..\move.c
  224.  
  225. mvcursor.obj:    ..\mvcursor.c ..\curses.h ..\curspriv.h
  226.     $(CC) $(CFLAGS) -Fomvcursor ..\mvcursor.c
  227.  
  228. newwin.obj:    ..\newwin.c ..\curses.h ..\curspriv.h
  229.     $(CC) $(CFLAGS) -Fonewwin ..\newwin.c
  230.  
  231. options.obj:    ..\options.c ..\curses.h ..\curspriv.h
  232.     $(CC) $(CFLAGS) -Fooptions ..\options.c
  233.  
  234. overlay.obj:    ..\overlay.c ..\curses.h ..\curspriv.h
  235.     $(CC) $(CFLAGS) -Fooverlay ..\overlay.c
  236.  
  237. prntscan.obj:    ..\prntscan.c ..\curses.h ..\curspriv.h
  238.     $(CC) -M$(MODEL) -c -Oat -W3 -Foprntscan ..\prntscan.c
  239.  
  240. refresh.obj:    ..\refresh.c ..\curses.h ..\curspriv.h
  241.     $(CC) $(CFLAGS) -Forefresh ..\refresh.c
  242.  
  243. scrreg.obj:    ..\scrreg.c ..\curses.h ..\curspriv.h
  244.     $(CC) $(CFLAGS) -Foscrreg ..\scrreg.c
  245.  
  246. setmode.obj:    ..\setmode.c ..\curses.h ..\curspriv.h
  247.     $(CC) $(CFLAGS) -Fosetmode ..\setmode.c
  248.  
  249. setterm.obj:    ..\setterm.c ..\curses.h ..\curspriv.h
  250.     $(CC) $(CFLAGS) -Fosetterm ..\setterm.c
  251.  
  252. stradd.obj:    ..\stradd.c ..\curses.h ..\curspriv.h
  253.     $(CC) $(CFLAGS) -Fostradd ..\stradd.c
  254.  
  255. strget.obj:    ..\strget.c ..\curses.h ..\curspriv.h
  256.     $(CC) $(CFLAGS) -Fostrget ..\strget.c
  257.  
  258. tabsize.obj:    ..\tabsize.c ..\curses.h ..\curspriv.h
  259.     $(CC) $(CFLAGS) -Fotabsize ..\tabsize.c
  260.  
  261. termmisc.obj:    ..\termmisc.c ..\curses.h ..\curspriv.h
  262.     $(CC) $(CFLAGS) -Fotermmisc ..\termmisc.c
  263.  
  264. unctrl.obj:    ..\unctrl.c ..\curses.h ..\curspriv.h
  265.     $(CC) $(CFLAGS) -Founctrl ..\unctrl.c
  266.  
  267. update.obj:    ..\update.c ..\curses.h ..\curspriv.h
  268.     $(CC) $(CFLAGS) -Foupdate ..\update.c
  269.  
  270. winclear.obj:    ..\winclear.c ..\curses.h ..\curspriv.h
  271.     $(CC) $(CFLAGS) -Fowinclear ..\winclear.c
  272.  
  273. windel.obj:    ..\windel.c ..\curses.h ..\curspriv.h
  274.     $(CC) $(CFLAGS) -Fowindel ..\windel.c
  275.  
  276. winerase.obj:    ..\winerase.c ..\curses.h ..\curspriv.h
  277.     $(CC) $(CFLAGS) -Fowinerase ..\winerase.c
  278.  
  279. winmove.obj:    ..\winmove.c ..\curses.h ..\curspriv.h
  280.     $(CC) $(CFLAGS) -Fowinmove ..\winmove.c
  281.  
  282. winscrol.obj:    ..\winscrol.c ..\curses.h ..\curspriv.h
  283.     $(CC) $(CFLAGS) -Fowinscrol ..\winscrol.c
  284.  
  285. wintouch.obj:    ..\wintouch.c ..\curses.h ..\curspriv.h
  286.     $(CC) $(CFLAGS) -Fowintouch ..\wintouch.c
  287.  
  288. #################################################################
  289. # You have to choose one of the two following ways to make a    #
  290. # CURSESIO.OBJ - either the 'C' version or the 'ASM' version.    #
  291. # Comment out the one you do not like.                #
  292. #################################################################
  293.  
  294. cursesio.obj:    ..\cursesio.c
  295.     $(CC) $(CFLAGS) -Focursesio ..\cursesio.c
  296.  
  297. #cursesio.obj:    ..\cursesio.asm
  298. #    masm ..\cursesio.asm/mx,cursesio.obj,nul,nul;
  299.  
  300. #################################################################
  301. # Perform a backup of the files in the directory where the    #
  302. # 'make backup' command was issued - copies all files to the    #
  303. # floppy in drive A:                        #
  304. #################################################################
  305.  
  306. backup:
  307.     @echo ***** Backup of PCcurses *****
  308.     @echo Insert backup diskette in drive A: and hit any key!
  309.     @pause
  310.     @echo Y > yes.txt
  311.     del a:\*.* < yes.txt >NUL
  312.     @del yes.txt
  313.     copy *.* a:
  314.  
  315. #################################################################
  316. # Remove all temporary files and work directories that were    #
  317. # created                            #
  318. #################################################################
  319.  
  320. clean:
  321.     @echo Y > yes.txt
  322.     del smodel\*.* < yes.txt >NUL
  323.     del cmodel\*.* < yes.txt >NUL
  324.     del mmodel\*.* < yes.txt >NUL
  325.     del lmodel\*.* < yes.txt >NUL
  326.     @del yes.txt
  327.     rmdir smodel
  328.     rmdir cmodel
  329.     rmdir mmodel
  330.     rmdir lmodel
  331.