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

  1. #       This 'make' file will generate the c-tree library and executables.
  2. #
  3. #       To invoke the Turbo C make with this 'make' file, one has to pass
  4. #       at least 1 parameter - MM, and a file named "mct.mac" which includes
  5. #       the following
  6. #         1)    TCD   - if it is defined, use default Turbo C directory path
  7. #            or TCDIR - if TCD is not defined, the Turbo C directory path 
  8. #                       will be stored here
  9. #         2)    RTREE - stores the given r-tree path, if it is not defined,
  10. #                       use default r-tree path
  11. #         3)    TC10  - if set to 'x', it signify Turbo C version 1.0 is used
  12.  
  13. !include "mct.mac"
  14.  
  15. # MM   - Memory model (s, c, m, l); it must be specified when invoking make
  16. !if !$d(MM)
  17. MM=s
  18. !endif
  19.  
  20. # TCDIR                               - Turboc C directory
  21. !if !$d(TCDIR)
  22. TCDIR=c:\turboc
  23. !endif
  24.  
  25. # RTREE                               - r-tree directory
  26. !if !$d(RTREE)
  27. RTREE=..\..\rtree
  28. !endif
  29.  
  30. # COMPILER                            - compiler with appropriate switches
  31. COMPILER=$(TCDIR)\tcc -c -w-
  32.  
  33. # TCP                                 - compiler switch for Turbo C lib path
  34. TCP=-L$(TCDIR)\lib
  35.  
  36. # P                                   - path to 'include' files
  37. #                                     - if using Turbo C 1.0, use
  38. #                                       following definition for P instead
  39. !if $d(TC10)
  40. P=-I.\ -I..\ -I$(RTREE) -I$(TCDIR) -I$(TCDIR)\include -I$(TCDIR)\include\sys
  41. !else
  42. P=-I.\;..\;$(RTREE);$(TCDIR);$(TCDIR)\include;$(TCDIR)\include\sys
  43. !endif
  44.  
  45. # CM                                  - compiler memory model switch
  46. CM=-m$(MM)
  47.  
  48. # D                                   - c-tree library & utilities directory
  49. D=$(MM)app
  50.  
  51. # LN                                  - c-tree library name
  52. LN=ctalib
  53.  
  54. # ALIB                                - c-tree library name with 'lib' extension
  55. ALIB=$(LN).lib
  56.  
  57. # LIBRARIAN                           - object modules librarian
  58. LIBRARIAN=$(TCDIR)\tlib
  59.  
  60. # LINK                                - linker with appropiate switch
  61. #                                       if using Turbo C 1.0 with large memory model,
  62. #                                       use special definition 
  63. #                                       (exit.obj has been extracted from c0l)
  64. !if $d(TC10) && $(mm)==l
  65. LINK=$(TCDIR)\tlink $(TCDIR)\lib\c0$(MM) $(TCDIR)\lib\exit.obj
  66. !else
  67. LINK=$(TCDIR)\tlink $(TCDIR)\lib\c0$(MM)
  68. !endif
  69.  
  70. # executables ----------------------------------------------------------------
  71.  
  72. executables: $(D)\ctexmc.exe $(D)\ctexmg.exe $(D)\ctvxmg.exe $(D)\ctixmg.exe \
  73.              $(D)\cttest.exe $(D)\ctcmpc.exe $(D)\ctflat.exe $(D)\ctpkey.exe \
  74.              $(D)\ctrbld.exe
  75.  
  76. # sample programs and utilities ----------------------------------------------
  77.  
  78. $(D)\ctexmc.exe: $(D)\ctexmc.obj $(D)\$(ALIB)
  79.         cd $(D)
  80.         $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
  81.         cd ..
  82.  
  83. $(D)\ctexmc.obj: ..\ctexmc.c
  84.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  85.     copy $&.obj $(D)\*.*
  86.     del $&.obj
  87.  
  88. $(D)\ctexmg.exe: $(D)\ctexmg.obj $(D)\$(ALIB)
  89.     cd $(D)
  90.     $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
  91.     cd ..
  92.  
  93. $(D)\ctexmg.obj: ..\ctexmg.c
  94.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  95.     copy $&.obj $(D)\*.*
  96.     del $&.obj
  97.  
  98. $(D)\ctvxmg.exe: $(D)\ctvxmg.obj $(D)\$(ALIB)
  99.     cd $(D)
  100.     $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
  101.     cd ..
  102.  
  103. $(D)\ctvxmg.obj: ..\ctvxmg.c
  104.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  105.     copy $&.obj $(D)\*.*
  106.     del $&.obj
  107.  
  108. $(D)\ctixmg.exe: $(D)\ctixmg.obj $(D)\$(ALIB)
  109.     cd $(D)
  110.     $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
  111.     cd ..
  112.  
  113. $(D)\ctixmg.obj: ..\ctixmg.c
  114.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  115.     copy $&.obj $(D)\*.*
  116.     del $&.obj
  117.  
  118. $(D)\cttest.exe: ..\cttest.c
  119.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  120.     $(LINK) $&,$(D)\$&,, $(TCDIR)\lib\c$(MM)
  121.     del cttest.obj
  122.  
  123. $(D)\ctcmpc.exe: $(D)\ctcmpc.obj $(D)\$(ALIB)
  124.     cd $(D)
  125.     $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
  126.     cd ..
  127.  
  128. $(D)\ctcmpc.obj: ..\ctcmpc.c
  129.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  130.     copy $&.obj $(D)\*.*
  131.     del $&.obj
  132.  
  133. $(D)\ctflat.exe: $(D)\ctflat.obj $(D)\$(ALIB)
  134.     cd $(D)
  135.     $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
  136.     cd ..
  137.  
  138. $(D)\ctflat.obj: ..\ctflat.c
  139.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  140.     copy $&.obj $(D)\*.*
  141.     del $&.obj
  142.  
  143. $(D)\ctpkey.exe: $(D)\ctpkey.obj $(D)\$(ALIB)
  144.     cd $(D)
  145.     $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
  146.     cd ..
  147.  
  148. $(D)\ctpkey.obj: ..\ctpkey.c
  149.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  150.     copy $&.obj $(D)\*.*
  151.     del $&.obj
  152.  
  153. $(D)\ctrbld.exe: $(D)\ctrbld.obj $(D)\$(ALIB)
  154.     cd $(D)
  155.     $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
  156.     cd ..
  157.  
  158. $(D)\ctrbld.obj: ..\ctrbld.c
  159.     command /c echo    CTRBLD CANNOT BE USED WITH FPUTFGET (create an entire NOTFORCE library)
  160.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  161.     copy $&.obj $(D)\*.*
  162.     del $&.obj
  163.  
  164. # the c-tree library --------------------------------------------
  165.  
  166. $(D)\$(ALIB) :    $(D)\ctibld.obj $(D)\ctrbl2.obj $(D)\ctvrc2.obj \
  167.              $(D)\ctdelk.obj $(D)\ctaddk.obj $(D)\ctupdt.obj \
  168.              $(D)\ctsrch.obj $(D)\ctdatf.obj $(D)\ctkeyf.obj \
  169.              $(D)\ctkrnl.obj $(D)\ctcomp.obj $(D)\ctvrcu.obj \
  170.              $(D)\ctinit.obj $(D)\ctdelf.obj $(D)\ctclb2.obj \
  171.              $(D)\ctclib.obj $(D)\ctclb3.obj $(D)\ctfrac.obj \
  172.              $(D)\ctsset.obj $(D)\ctisam.obj $(D)\ctvrec.obj \
  173.              $(D)\ctism2.obj $(D)\ctestm.obj $(D)\ctload.obj \
  174.              $(D)\ctismc.obj $(D)\ctismo.obj $(D)\cticre.obj \
  175.              $(D)\ctiopn.obj \
  176.              $(D)\cticls.obj $(D)\ctifil.obj \
  177.              $(D)\ctismu.obj $(D)\ctdbug.obj
  178.     cd $(D)
  179.     del $(LN).bak
  180.         rename $(ALIB) $(LN).bak
  181.         $(LIBRARIAN) $(ALIB) + ctibld + ctrbl2 + ctsset + ctisam + ctvrec + ctism2
  182.         $(LIBRARIAN) $(ALIB) + ctismc + ctismo + cticre + ctiopn + cticls + ctifil
  183.         $(LIBRARIAN) $(ALIB) + ctismu + ctvrc2 + ctload + ctdelk + ctaddk + ctupdt + ctestm + ctfrac
  184.         $(LIBRARIAN) $(ALIB) + ctsrch + ctdatf + ctkeyf + ctkrnl + ctcomp + ctvrcu + ctdelf
  185.         $(LIBRARIAN) $(ALIB) + ctinit + ctclb2 + ctclib + ctclb3 + ctdbug
  186.     cd ..
  187.  
  188. # library modules ----------------------------------------------------
  189.  
  190. $(D)\ctibld.obj: ..\ctibld.c
  191.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  192.     copy $&.obj $(D)\*.*
  193.     del $&.obj
  194.  
  195. $(D)\ctrbl2.obj: ..\ctrbl2.c
  196.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  197.     copy $&.obj $(D)\*.*
  198.     del $&.obj
  199.  
  200. $(D)\ctvrc2.obj: ..\ctvrc2.c
  201.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  202.     copy $&.obj $(D)\*.*
  203.     del $&.obj
  204.  
  205. $(D)\ctdelk.obj: ..\ctdelk.c
  206.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  207.     copy $&.obj $(D)\*.*
  208.     del $&.obj
  209.  
  210. $(D)\ctaddk.obj: ..\ctaddk.c
  211.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  212.     copy $&.obj $(D)\*.*
  213.     del $&.obj
  214.  
  215. $(D)\ctupdt.obj: ..\ctupdt.c
  216.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  217.     copy $&.obj $(D)\*.*
  218.     del $&.obj
  219.  
  220. $(D)\ctsrch.obj: ..\ctsrch.c
  221.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  222.     copy $&.obj $(D)\*.*
  223.     del $&.obj
  224.  
  225. $(D)\ctdatf.obj: ..\ctdatf.c
  226.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  227.     copy $&.obj $(D)\*.*
  228.     del $&.obj
  229.  
  230. $(D)\ctkeyf.obj: ..\ctkeyf.c
  231.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  232.     copy $&.obj $(D)\*.*
  233.     del $&.obj
  234.  
  235. $(D)\ctkrnl.obj: ..\ctkrnl.c
  236.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  237.     copy $&.obj $(D)\*.*
  238.     del $&.obj
  239.  
  240. $(D)\ctclb3.obj: ..\ctclb3.c
  241.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  242.     copy $&.obj $(D)\*.*
  243.     del $&.obj
  244.  
  245. $(D)\ctcomp.obj: ..\ctcomp.c
  246.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  247.     copy $&.obj $(D)\*.*
  248.     del $&.obj
  249.  
  250. $(D)\ctvrcu.obj: ..\ctvrcu.c
  251.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  252.     copy $&.obj $(D)\*.*
  253.     del $&.obj
  254.  
  255. $(D)\ctinit.obj: ..\ctinit.c
  256.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  257.     copy $&.obj $(D)\*.*
  258.     del $&.obj
  259.  
  260. $(D)\ctdelf.obj: ..\ctdelf.c
  261.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  262.     copy $&.obj $(D)\*.*
  263.     del $&.obj
  264.  
  265. $(D)\ctload.obj: ..\ctload.c
  266.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  267.     copy $&.obj $(D)\*.*
  268.     del $&.obj
  269.  
  270. $(D)\ctfrac.obj: ..\ctfrac.c
  271.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  272.     copy $&.obj $(D)\*.*
  273.     del $&.obj
  274.  
  275. $(D)\ctestm.obj: ..\ctestm.c
  276.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  277.     copy $&.obj $(D)\*.*
  278.     del $&.obj
  279.  
  280. $(D)\ctclb2.obj: ..\ctclb2.c
  281.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  282.     copy $&.obj $(D)\*.*
  283.     del $&.obj
  284.  
  285. $(D)\ctclib.obj: ctclib.c
  286.     $(COMPILER) $(P) $(TCP) $(CM) $&.c
  287.     copy $&.obj $(D)\*.*
  288.     del $&.obj
  289.  
  290. $(D)\ctsset.obj: ..\ctsset.c
  291.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  292.     copy $&.obj $(D)\*.*
  293.     del $&.obj
  294.  
  295. $(D)\ctisam.obj: ..\ctisam.c
  296.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  297.     copy $&.obj $(D)\*.*
  298.     del $&.obj
  299.  
  300. $(D)\ctvrec.obj: ..\ctvrec.c
  301.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  302.     copy $&.obj $(D)\*.*
  303.     del $&.obj
  304.  
  305. $(D)\ctism2.obj: ..\ctism2.c
  306.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  307.     copy $&.obj $(D)\*.*
  308.     del $&.obj
  309.  
  310. $(D)\ctismc.obj: ..\ctismc.c
  311.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  312.     copy $&.obj $(D)\*.*
  313.     del $&.obj
  314.  
  315. $(D)\ctismo.obj: ..\ctismo.c
  316.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  317.     copy $&.obj $(D)\*.*
  318.     del $&.obj
  319.  
  320. $(D)\cticre.obj: ..\cticre.c
  321.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  322.     copy $&.obj $(D)\*.*
  323.     del $&.obj
  324.  
  325. $(D)\ctiopn.obj: ..\ctiopn.c
  326.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  327.     copy $&.obj $(D)\*.*
  328.     del $&.obj
  329.  
  330. $(D)\cticls.obj: ..\cticls.c
  331.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  332.     copy $&.obj $(D)\*.*
  333.     del $&.obj
  334.  
  335. $(D)\ctifil.obj: ..\ctifil.c
  336.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  337.     copy $&.obj $(D)\*.*
  338.     del $&.obj
  339.  
  340. $(D)\ctismu.obj: ..\ctismu.c
  341.     $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  342.     copy $&.obj $(D)\*.*
  343.     del $&.obj
  344.  
  345. $(D)\ctdbug.obj: ..\ctdbug.c
  346.         $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
  347.     copy $&.obj $(D)\*.*
  348.     del $&.obj
  349.  
  350. # end
  351.