home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c004 / 2.ddi / TC / MVAPAPP.MAK < prev    next >
Encoding:
Text File  |  1989-04-18  |  7.7 KB  |  285 lines

  1. #       This 'make' file will generate the c-tree library and executables.
  2. #    for use with a Novell VAP c-tree server.
  3. #
  4. #       To invoke the Turbo C make with this 'make' file, one has to pass
  5. #       at least 1 parameter - MM, and a file named "mct.mac" which includes
  6. #       the following
  7. #         1)    TCD   - if it is defined, use default Turbo C directory path
  8. #            or TCDIR - if TCD is not defined, the Turbo C directory path 
  9. #                       will be stored here
  10. #         2)    RTREE - stores the given r-tree path, if it is not defined,
  11. #                       use default r-tree path
  12. #         3)    TC10  - if set to 'x', it signify Turbo C version 1.0 is used
  13.  
  14. !include "mct.mac"
  15.  
  16. ASM=masm
  17.  
  18. # MM   - Memory model (s, c, m, l); it must be specified when invoking make
  19. !if !$d(MM)
  20. MM=s
  21. !endif
  22.  
  23. # TCDIR                               - Turboc C directory
  24. !if !$d(TCDIR)
  25. TCDIR=c:\turboc
  26. !endif
  27.  
  28. # RTREE                               - r-tree directory
  29. !if !$d(RTREE)
  30. RTREE=..\..\rtree
  31. !endif
  32.  
  33. # COMPILER                            - compiler with appropriate switches
  34. COMPILER=$(TCDIR)\tcc -c -w-
  35.  
  36. # TCP                                 - compiler switch for Turbo C lib path
  37. TCP=-L$(TCDIR)\lib
  38.  
  39. # P                                   - path to 'include' files
  40. #                                     - if using Turbo C 1.0, use
  41. #                                       following definition for P instead
  42. !if $d(TC10)
  43. P=-I.\ -I..\ -I$(RTREE) -I$(TCDIR) -I$(TCDIR)\include -I$(TCDIR)\include\sys
  44. !else
  45. P=-I.\;..\;$(RTREE);$(TCDIR);$(TCDIR)\include;$(TCDIR)\include\sys
  46. !endif
  47.  
  48. # CM                                  - compiler memory model switch
  49. CM=-m$(MM)
  50.  
  51. # D                                   - c-tree library & utilities directory
  52. D=$(MM)app.vap
  53.  
  54. # LN                                  - c-tree library name
  55. LN=ctalib
  56. NV=..\..\novell\nov$$(MM)app
  57. RLIB=$(LN)+$(NV)
  58.  
  59. # ALIB                                - c-tree library name with 'lib' extension
  60. ALIB=$(LN).lib
  61.  
  62. # LIBRARIAN                           - object modules librarian
  63. LIBRARIAN=$(TCDIR)\tlib
  64.  
  65. # LINK                                - linker with appropiate switch
  66. #                                       if using Turbo C 1.0 with large memory model,
  67. #                                       use special definition 
  68. #                                       (exit.obj has been extracted from c0l)
  69. !if $d(TC10) && $(mm)==l
  70. LINK=$(TCDIR)\tlink $(TCDIR)\lib\c0$(MM) $(TCDIR)\lib\exit.obj
  71. !else
  72. LINK=$(TCDIR)\tlink $(TCDIR)\lib\c0$(MM)
  73. !endif
  74.  
  75. # executables ----------------------------------------------------------------
  76.  
  77. executables: $(D)\ctexmc.exe $(D)\ctexmg.exe $(D)\ctvxmg.exe $(D)\ctixmg.exe \
  78.              $(D)\ctpkey.exe $(D)\ctstop.exe $(D)\ctstat.exe
  79.  
  80. # sample programs and utilities ----------------------------------------------
  81.  
  82. $(D)\ctexmc.exe: $(D)\ctexmc.obj $(D)\$(ALIB)
  83.         cd $(D)
  84.         $(LINK) $&,$&,,$(RLIB) $(TCDIR)\lib\c$(MM)
  85.         cd ..
  86.  
  87. $(D)\ctexmc.obj: ..\ctexmc.c
  88.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  89.     copy $&.obj $(D)\*.*
  90.     del $&.obj
  91.  
  92. $(D)\ctexmg.exe: $(D)\ctexmg.obj $(D)\$(ALIB)
  93.     cd $(D)
  94.     $(LINK) $&,$&,,$(RLIB) $(TCDIR)\lib\c$(MM)
  95.     cd ..
  96.  
  97. $(D)\ctexmg.obj: ..\ctexmg.c
  98.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  99.     copy $&.obj $(D)\*.*
  100.     del $&.obj
  101.  
  102. $(D)\ctvxmg.exe: $(D)\ctvxmg.obj $(D)\$(ALIB)
  103.     cd $(D)
  104.     $(LINK) $&,$&,,$(RLIB) $(TCDIR)\lib\c$(MM)
  105.     cd ..
  106.  
  107. $(D)\ctvxmg.obj: ..\ctvxmg.c
  108.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  109.     copy $&.obj $(D)\*.*
  110.     del $&.obj
  111.  
  112. $(D)\ctixmg.exe: $(D)\ctixmg.obj $(D)\$(ALIB)
  113.     cd $(D)
  114.     $(LINK) /m $&,$&,,$(RLIB) $(TCDIR)\lib\c$(MM)
  115.     cd ..
  116.  
  117. $(D)\ctixmg.obj: ..\ctixmg.c
  118.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  119.     copy $&.obj $(D)\*.*
  120.     del $&.obj
  121.  
  122. $(D)\ctpkey.exe: $(D)\ctpkey.obj $(D)\$(ALIB)
  123.     cd $(D)
  124.     $(LINK) $&,$&,,$(RLIB) $(TCDIR)\lib\c$(MM)
  125.     cd ..
  126.  
  127. $(D)\ctpkey.obj: ..\ctpkey.c
  128.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  129.     copy $&.obj $(D)\*.*
  130.     del $&.obj
  131.  
  132. $(D)\ctstop.exe: $(D)\ctstop.obj $(D)\$(ALIB)
  133.     cd $(D)
  134.     $(LINK) $&,$&,,$(RLIB) $(TCDIR)\lib\c$(MM)
  135.     cd ..
  136.  
  137. $(D)\ctstop.obj: ..\ctstop.c
  138.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  139.     copy $&.obj $(D)\*.*
  140.     del $&.obj
  141.  
  142. $(D)\ctstat.exe: $(D)\ctstat.obj $(D)\$(ALIB)
  143.     cd $(D)
  144.     $(LINK) $&,$&,,$(RLIB) $(TCDIR)\lib\c$(MM)
  145.     cd ..
  146.  
  147. $(D)\ctstat.obj: ..\ctstat.c
  148.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  149.     copy $&.obj $(D)\*.*
  150.     del $&.obj
  151.  
  152. # the c-tree library --------------------------------------------
  153.  
  154. $(D)\$(ALIB) :    $(D)\ctappx.obj $(D)\ctapx2.obj $(D)\ctapx3.obj \
  155.         $(D)\ctapx4.obj $(D)\ctcomp.obj $(D)\ctvrcu.obj \
  156.              $(D)\ctclb2.obj \
  157.              $(D)\ctsset.obj $(D)\ctisam.obj $(D)\ctvrec.obj \
  158.              $(D)\ctism2.obj $(D)\ctestm.obj \
  159.              $(D)\ctismc.obj $(D)\ctismo.obj $(D)\cticre.obj \
  160.              $(D)\ctiopn.obj \
  161.              $(D)\cticls.obj $(D)\ctifil.obj \
  162.              $(D)\ctismu.obj $(D)\ctamsg.obj $(D)\ctaxit.obj $(D)\ctdumy.obj
  163.     cd $(D)
  164.     del $(LN).bak
  165.         rename $(ALIB) $(LN).bak
  166.     $(LIBRARIAN) $(ALIB) + ctamsg + ctaxit + ctdumy
  167.         $(LIBRARIAN) $(ALIB) + ctappx + ctapx2 + ctsset + ctisam + ctvrec + ctvrcu + ctism2
  168.         $(LIBRARIAN) $(ALIB) + ctismc + ctismo + cticre + ctiopn + ctcomp + cticls + ctifil
  169.         $(LIBRARIAN) $(ALIB) + ctismu + ctapx3 + ctapx4 + ctestm + ctclb2
  170.     cd ..
  171.  
  172. # library modules ----------------------------------------------------
  173.  
  174. $(D)\ctamsg.obj: ..\novell\ctamsg.c ..\novell\ctaxit.h
  175.     $(COMPILER) -I..\novell $(P) $(TCP) $(CM) ..\novell\$&.c
  176.     copy $&.obj $(D)\*.*
  177.     del $&.obj
  178.  
  179. $(D)\ctaxit.obj: ..\novell\ctaxit.asm
  180.     $(ASM) ..\novell\$&/ml/I..\novell /D$(AM);
  181.     copy $&.obj $(D)\*.*
  182.     del $&.obj
  183.  
  184. $(D)\ctdumy.obj: ctdumy.c
  185.     $(COMPILER) $(P) $(TCP) $(CM) $&.c
  186.     copy $&.obj $(D)\*.*
  187.     del $&.obj
  188.  
  189. $(D)\ctappx.obj: ..\ctappx.c
  190.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  191.     copy $&.obj $(D)\*.*
  192.     del $&.obj
  193.  
  194. $(D)\ctapx2.obj: ..\ctapx2.c
  195.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  196.     copy $&.obj $(D)\*.*
  197.     del $&.obj
  198.  
  199. $(D)\ctapx3.obj: ..\ctapx3.c
  200.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  201.     copy $&.obj $(D)\*.*
  202.     del $&.obj
  203.  
  204. $(D)\ctapx4.obj: ..\ctapx4.c
  205.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  206.     copy $&.obj $(D)\*.*
  207.     del $&.obj
  208.  
  209. $(D)\ctcomp.obj: ..\ctcomp.c
  210.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  211.     copy $&.obj $(D)\*.*
  212.     del $&.obj
  213.  
  214. $(D)\ctvrcu.obj: ..\ctvrcu.c
  215.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  216.     copy $&.obj $(D)\*.*
  217.     del $&.obj
  218.  
  219. $(D)\ctestm.obj: ..\ctestm.c
  220.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  221.     copy $&.obj $(D)\*.*
  222.     del $&.obj
  223.  
  224. $(D)\ctclb2.obj: ..\ctclb2.c
  225.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  226.     copy $&.obj $(D)\*.*
  227.     del $&.obj
  228.  
  229. $(D)\ctsset.obj: ..\ctsset.c
  230.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  231.     copy $&.obj $(D)\*.*
  232.     del $&.obj
  233.  
  234. $(D)\ctisam.obj: ..\ctisam.c
  235.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  236.     copy $&.obj $(D)\*.*
  237.     del $&.obj
  238.  
  239. $(D)\ctvrec.obj: ..\ctvrec.c
  240.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  241.     copy $&.obj $(D)\*.*
  242.     del $&.obj
  243.  
  244. $(D)\ctism2.obj: ..\ctism2.c
  245.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  246.     copy $&.obj $(D)\*.*
  247.     del $&.obj
  248.  
  249. $(D)\ctismc.obj: ..\ctismc.c
  250.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  251.     copy $&.obj $(D)\*.*
  252.     del $&.obj
  253.  
  254. $(D)\ctismo.obj: ..\ctismo.c
  255.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  256.     copy $&.obj $(D)\*.*
  257.     del $&.obj
  258.  
  259. $(D)\cticre.obj: ..\cticre.c
  260.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  261.     copy $&.obj $(D)\*.*
  262.     del $&.obj
  263.  
  264. $(D)\ctiopn.obj: ..\ctiopn.c
  265.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  266.     copy $&.obj $(D)\*.*
  267.     del $&.obj
  268.  
  269. $(D)\cticls.obj: ..\cticls.c
  270.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  271.     copy $&.obj $(D)\*.*
  272.     del $&.obj
  273.  
  274. $(D)\ctifil.obj: ..\ctifil.c
  275.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  276.     copy $&.obj $(D)\*.*
  277.     del $&.obj
  278.  
  279. $(D)\ctismu.obj: ..\ctismu.c
  280.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  281.     copy $&.obj $(D)\*.*
  282.     del $&.obj
  283.  
  284. # end
  285.