home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / MOUSE / CMOUSE2.ZIP / MAKEFILE < prev    next >
Encoding:
Text File  |  1990-11-21  |  4.3 KB  |  164 lines

  1. # The following are the directories where your lib and include files
  2. # will be installed. These need to be edited for your system.
  3.  
  4. BASE  = \usr\misc\cmouse
  5. LIBDIR=    \usr\lib
  6. INCDIR= \usr\include
  7.  
  8. # General definitions:
  9.  
  10. CFLAGS=        -M$(MODEL) -Gs -W2 -c
  11.  
  12. COBJS=        mouse.obj
  13.  
  14. ASMOBJS=    handler.obj
  15.  
  16. OBJS=        $(COBJS) $(ASMOBJS)
  17.  
  18. CC=        cl
  19.  
  20. all:        small compact medium large
  21.  
  22. $(COBJS): $(INCDIR)\mouse.h
  23.  
  24. #################################################################
  25. # 'all' is all that can (and usually is) done            #
  26. #################################################################
  27.  
  28. #################################################################
  29. # The following copies the header files to their proper place    #
  30. #################################################################
  31.  
  32. headers:    $(INCDIR)\mouse.h
  33.  
  34. $(INCDIR)\mouse.h:    $(BASE)\mouse.h
  35.     copy mouse.h $(INCDIR)\mouse.h
  36.  
  37. #################################################################
  38. # The following will create a subdirectory for each memory    #
  39. # model, and initiate the make:ing in each one.            #
  40. #################################################################
  41.  
  42. #################################################################
  43. # Create work directory if non-existent, go to it, and        #
  44. # perform the job - small model                    #
  45. #################################################################
  46.  
  47. small:        headers            \
  48.         smodel            \
  49.         smodel\farnear.inc    \
  50.         smodel\smalhuge.inc    \
  51.         smodel\model.inc
  52.     cd    smodel
  53.     make  -f ..\makefile $(MAKEFLAGS) "MODEL=s" $(LIBDIR)\smouse.lib
  54.     cd    ..
  55.  
  56. smodel:
  57.     mkdir    smodel
  58.  
  59. smodel\farnear.inc:    nearcall.inc
  60.     copy    nearcall.inc    smodel\farnear.inc
  61.  
  62. smodel\smalhuge.inc:    smaldata.inc
  63.     copy    smaldata.inc    smodel\smalhuge.inc
  64.  
  65. smodel\model.inc:        small.inc
  66.     copy    small.inc        smodel\model.inc
  67.  
  68. #################################################################
  69. # Create work directory if non-existent, go to it, and        #
  70. # perform the job - compact model                #
  71. #################################################################
  72.  
  73. compact:    headers            \
  74.         cmodel            \
  75.         cmodel\farnear.inc    \
  76.         cmodel\smalhuge.inc    \
  77.         cmodel\model.inc
  78.     cd    cmodel
  79.     make  -f ..\makefile $(MAKEFLAGS) "MODEL=c" $(LIBDIR)\cmouse.lib
  80.     cd    ..
  81.  
  82. cmodel:
  83.     mkdir    cmodel
  84.  
  85. cmodel\farnear.inc:    nearcall.inc
  86.     copy    nearcall.inc    cmodel\farnear.inc
  87.  
  88. cmodel\smalhuge.inc:    hugedata.inc
  89.     copy    hugedata.inc    cmodel\smalhuge.inc
  90.  
  91. cmodel\model.inc:    compact.inc
  92.     copy    compact.inc        cmodel\model.inc
  93.  
  94. #################################################################
  95. # Create work directory if non-existent, go to it, and        #
  96. # perform the job - medium model                #
  97. #################################################################
  98.  
  99. medium:        headers            \
  100.         mmodel            \
  101.         mmodel\farnear.inc    \
  102.         mmodel\smalhuge.inc    \
  103.         mmodel\model.inc
  104.     cd    mmodel
  105.     make  -f ..\makefile $(MAKEFLAGS) "MODEL=m" $(LIBDIR)\mmouse.lib
  106.     cd    ..
  107.  
  108. mmodel:
  109.     mkdir    mmodel
  110.  
  111. mmodel\farnear.inc:    farcall.inc
  112.     copy    farcall.inc    mmodel\farnear.inc
  113.  
  114. mmodel\smalhuge.inc:    smaldata.inc
  115.     copy    smaldata.inc    mmodel\smalhuge.inc
  116.  
  117. mmodel\model.inc:        medium.inc
  118.     copy    medium.inc        mmodel\model.inc
  119.  
  120. #################################################################
  121. # Create work directory if non-existent, go to it, and        #
  122. # perform the job - large model                    #
  123. #################################################################
  124.  
  125. large:        headers            \
  126.         lmodel            \
  127.         lmodel\farnear.inc    \
  128.         lmodel\smalhuge.inc    \
  129.         lmodel\model.inc
  130.     cd    lmodel
  131.     make  -f ..\makefile $(MAKEFLAGS) "MODEL=l" $(LIBDIR)\lmouse.lib
  132.     cd    ..
  133.  
  134. lmodel:
  135.     mkdir    lmodel
  136.  
  137. lmodel\farnear.inc:    farcall.inc
  138.     copy    farcall.inc    lmodel\farnear.inc
  139.  
  140. lmodel\smalhuge.inc:    hugedata.inc
  141.     copy    hugedata.inc    lmodel\smalhuge.inc
  142.  
  143. lmodel\model.inc:        large.inc
  144.     copy    large.inc        lmodel\model.inc
  145.  
  146. #################################################################
  147. # Put together the library in file tmp.lib, then copy it to    #
  148. # the appropriate name for the memory model in question, and    #
  149. # delete the temporary file                    #
  150. #################################################################
  151.  
  152. $(LIBDIR)\$(MODEL)mouse.lib:    $(OBJS)
  153.     del    tmp.lib
  154.     lib @..\mouse.cmd
  155.     copy    tmp.lib $(LIBDIR)\$(MODEL)mouse.lib
  156.     del    tmp.lib
  157.  
  158. handler.obj:    ..\handler.asm
  159.     masm -Mx ..\handler.asm,handler.obj,nul,nul;
  160.  
  161. mouse.obj:        ..\mouse.c
  162.     $(CC)    $(CFLAGS) ..\mouse.c
  163.  
  164.