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

  1. #       This 'make' file will generate the c-tree library and executables.
  2. #    for use with a netbios 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.net
  53.  
  54. # LN                                  - c-tree library name
  55. LN=ctalib
  56.  
  57. # ALIB                                - c-tree library name with 'lib' extension
  58. ALIB=$(LN).lib
  59.  
  60. # LIBRARIAN                           - object modules librarian
  61. LIBRARIAN=$(TCDIR)\tlib
  62.  
  63. # LINK                                - linker with appropiate switch
  64. #                                       if using Turbo C 1.0 with large memory model,
  65. #                                       use special definition 
  66. #                                       (exit.obj has been extracted from c0l)
  67. !if $d(TC10) && $(mm)==l
  68. LINK=$(TCDIR)\tlink $(TCDIR)\lib\c0$(MM) $(TCDIR)\lib\exit.obj
  69. !else
  70. LINK=$(TCDIR)\tlink $(TCDIR)\lib\c0$(MM)
  71. !endif
  72.  
  73. # executables ----------------------------------------------------------------
  74.  
  75. executables: $(D)\ctexmc.exe $(D)\ctexmg.exe $(D)\ctvxmg.exe $(D)\ctixmg.exe \
  76.              $(D)\ctpkey.exe $(D)\ctstop.exe $(D)\ctstat.exe
  77.  
  78. # sample programs and utilities ----------------------------------------------
  79.  
  80. $(D)\ctexmc.exe: $(D)\ctexmc.obj $(D)\$(ALIB)
  81.         cd $(D)
  82.         $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
  83.         cd ..
  84.  
  85. $(D)\ctexmc.obj: ..\ctexmc.c
  86.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  87.     copy $&.obj $(D)\*.*
  88.     del $&.obj
  89.  
  90. $(D)\ctexmg.exe: $(D)\ctexmg.obj $(D)\$(ALIB)
  91.     cd $(D)
  92.     $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
  93.     cd ..
  94.  
  95. $(D)\ctexmg.obj: ..\ctexmg.c
  96.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  97.     copy $&.obj $(D)\*.*
  98.     del $&.obj
  99.  
  100. $(D)\ctvxmg.exe: $(D)\ctvxmg.obj $(D)\$(ALIB)
  101.     cd $(D)
  102.     $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
  103.     cd ..
  104.  
  105. $(D)\ctvxmg.obj: ..\ctvxmg.c
  106.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  107.     copy $&.obj $(D)\*.*
  108.     del $&.obj
  109.  
  110. $(D)\ctixmg.exe: $(D)\ctixmg.obj $(D)\$(ALIB)
  111.     cd $(D)
  112.     $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
  113.     cd ..
  114.  
  115. $(D)\ctixmg.obj: ..\ctixmg.c
  116.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  117.     copy $&.obj $(D)\*.*
  118.     del $&.obj
  119.  
  120. $(D)\ctpkey.exe: $(D)\ctpkey.obj $(D)\$(ALIB)
  121.     cd $(D)
  122.     $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
  123.     cd ..
  124.  
  125. $(D)\ctpkey.obj: ..\ctpkey.c
  126.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  127.     copy $&.obj $(D)\*.*
  128.     del $&.obj
  129.  
  130. $(D)\ctstop.exe: $(D)\ctstop.obj $(D)\$(ALIB)
  131.     cd $(D)
  132.     $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
  133.     cd ..
  134.  
  135. $(D)\ctstop.obj: ..\ctstop.c
  136.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  137.     copy $&.obj $(D)\*.*
  138.     del $&.obj
  139.  
  140. $(D)\ctstat.exe: $(D)\ctstat.obj $(D)\$(ALIB)
  141.     cd $(D)
  142.     $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
  143.     cd ..
  144.  
  145. $(D)\ctstat.obj: ..\ctstat.c
  146.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  147.     copy $&.obj $(D)\*.*
  148.     del $&.obj
  149.  
  150. # the c-tree library --------------------------------------------
  151.  
  152. $(D)\$(ALIB) :    $(D)\ctappx.obj $(D)\ctapx2.obj $(D)\ctapx3.obj \
  153.         $(D)\ctapx4.obj $(D)\ctcomp.obj $(D)\ctvrcu.obj \
  154.              $(D)\ctclb2.obj \
  155.              $(D)\ctsset.obj $(D)\ctisam.obj $(D)\ctvrec.obj \
  156.              $(D)\ctism2.obj $(D)\ctestm.obj \
  157.              $(D)\ctismc.obj $(D)\ctismo.obj $(D)\cticre.obj \
  158.              $(D)\ctiopn.obj \
  159.              $(D)\cticls.obj $(D)\ctifil.obj \
  160.              $(D)\ctismu.obj $(D)\ctamsg.obj $(D)\ctaxit.obj $(D)\ctnbios.obj
  161.     cd $(D)
  162.     del $(LN).bak
  163.         rename $(ALIB) $(LN).bak
  164.     $(LIBRARIAN) $(ALIB) + ctamsg + ctaxit + ctnbios
  165.         $(LIBRARIAN) $(ALIB) + ctappx + ctapx2 + ctsset + ctisam + ctvrec + ctvrcu + ctism2
  166.         $(LIBRARIAN) $(ALIB) + ctismc + ctismo + cticre + ctiopn + ctcomp + cticls + ctifil
  167.         $(LIBRARIAN) $(ALIB) + ctismu + ctapx3 + ctapx4 + ctestm + ctclb2
  168.     cd ..
  169.  
  170. # library modules ----------------------------------------------------
  171.  
  172. $(D)\ctamsg.obj: ..\netbios\ctamsg.c ..\netbios\ctaxit.h
  173.     $(COMPILER) -I..\netbios $(P) $(TCP) $(CM) ..\netbios\$&.c
  174.     copy $&.obj $(D)\*.*
  175.     del $&.obj
  176.  
  177. $(D)\ctnbios.obj: ..\netbios\ctnbios.c
  178.     $(COMPILER) -I..\netbios $(P) $(TCP) $(CM) ..\netbios\$&.c
  179.     copy $&.obj $(D)\*.*
  180.     del $&.obj
  181.  
  182. $(D)\ctaxit.obj: ..\netbios\ctaxit.asm
  183.     $(ASM) ..\netbios\$&/ml/I..\netbios /D$(AM);
  184.     copy $&.obj $(D)\*.*
  185.     del $&.obj
  186.  
  187. $(D)\ctappx.obj: ..\ctappx.c
  188.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  189.     copy $&.obj $(D)\*.*
  190.     del $&.obj
  191.  
  192. $(D)\ctapx2.obj: ..\ctapx2.c
  193.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  194.     copy $&.obj $(D)\*.*
  195.     del $&.obj
  196.  
  197. $(D)\ctapx3.obj: ..\ctapx3.c
  198.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  199.     copy $&.obj $(D)\*.*
  200.     del $&.obj
  201.  
  202. $(D)\ctapx4.obj: ..\ctapx4.c
  203.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  204.     copy $&.obj $(D)\*.*
  205.     del $&.obj
  206.  
  207. $(D)\ctcomp.obj: ..\ctcomp.c
  208.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  209.     copy $&.obj $(D)\*.*
  210.     del $&.obj
  211.  
  212. $(D)\ctvrcu.obj: ..\ctvrcu.c
  213.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  214.     copy $&.obj $(D)\*.*
  215.     del $&.obj
  216.  
  217. $(D)\ctestm.obj: ..\ctestm.c
  218.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  219.     copy $&.obj $(D)\*.*
  220.     del $&.obj
  221.  
  222. $(D)\ctclb2.obj: ..\ctclb2.c
  223.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  224.     copy $&.obj $(D)\*.*
  225.     del $&.obj
  226.  
  227. $(D)\ctsset.obj: ..\ctsset.c
  228.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  229.     copy $&.obj $(D)\*.*
  230.     del $&.obj
  231.  
  232. $(D)\ctisam.obj: ..\ctisam.c
  233.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  234.     copy $&.obj $(D)\*.*
  235.     del $&.obj
  236.  
  237. $(D)\ctvrec.obj: ..\ctvrec.c
  238.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  239.     copy $&.obj $(D)\*.*
  240.     del $&.obj
  241.  
  242. $(D)\ctism2.obj: ..\ctism2.c
  243.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  244.     copy $&.obj $(D)\*.*
  245.     del $&.obj
  246.  
  247. $(D)\ctismc.obj: ..\ctismc.c
  248.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  249.     copy $&.obj $(D)\*.*
  250.     del $&.obj
  251.  
  252. $(D)\ctismo.obj: ..\ctismo.c
  253.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  254.     copy $&.obj $(D)\*.*
  255.     del $&.obj
  256.  
  257. $(D)\cticre.obj: ..\cticre.c
  258.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  259.     copy $&.obj $(D)\*.*
  260.     del $&.obj
  261.  
  262. $(D)\ctiopn.obj: ..\ctiopn.c
  263.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  264.     copy $&.obj $(D)\*.*
  265.     del $&.obj
  266.  
  267. $(D)\cticls.obj: ..\cticls.c
  268.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  269.     copy $&.obj $(D)\*.*
  270.     del $&.obj
  271.  
  272. $(D)\ctifil.obj: ..\ctifil.c
  273.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  274.     copy $&.obj $(D)\*.*
  275.     del $&.obj
  276.  
  277. $(D)\ctismu.obj: ..\ctismu.c
  278.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  279.     copy $&.obj $(D)\*.*
  280.     del $&.obj
  281.  
  282. # end
  283.