home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c004 / 4.ddi / NETBIOS / MAKESRV.MAK < prev    next >
Encoding:
Text File  |  1989-04-18  |  4.7 KB  |  194 lines

  1. ######################################################################
  2. # Make library for c-tree server and make ctsrvr.exe and ctsrvrfg.exe
  3. # Invoke with MAKESRV.BAT
  4. #
  5. # For NET BIOS server version.
  6. #
  7. ######################################################################
  8.  
  9.  
  10. ##################
  11. # default macros #
  12. ##################
  13.  
  14. # c compiler
  15. COMPILER=cl /c
  16.  
  17. # assembler
  18. ASM=masm
  19.  
  20. # c compiler model switch
  21. CM=/AS
  22.  
  23. # assemble model define
  24. AM=SMALL
  25.  
  26. # obj/exe/lib directory
  27. D=SSRV
  28.  
  29. #c compile include path
  30. P=/I .\ /I ..\ /I ..\msc
  31.  
  32. #linker name
  33. LINK=link
  34.  
  35. #library name
  36. LN=ctslib
  37.  
  38. #full library name
  39. SLIB=$(LN).lib
  40.  
  41.  
  42. ################################
  43. # complile all library modules #
  44. ################################
  45.  
  46.  
  47. $(D)\ctvrc2.obj: ..\ctvrc2.c
  48.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  49.  
  50. $(D)\ctdelk.obj: ..\ctdelk.c
  51.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  52.  
  53. $(D)\ctaddk.obj: ..\ctaddk.c
  54.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  55.  
  56. $(D)\ctupdt.obj: ..\ctupdt.c
  57.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  58.  
  59. $(D)\ctsrch.obj: ..\ctsrch.c
  60.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  61.  
  62. $(D)\ctfrac.obj: ..\ctfrac.c
  63.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  64.  
  65. $(D)\ctdatf.obj: ..\ctdatf.c
  66.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  67.  
  68. $(D)\ctkeyf.obj: ..\ctkeyf.c
  69.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  70.  
  71. $(D)\ctkrnl.obj: ..\ctkrnl.c
  72.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  73.  
  74. $(D)\ctclb3.obj: ..\ctclb3.c
  75.     $(COMPILER) /Gs $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  76.  
  77. $(D)\ctcomp.obj: ..\ctcomp.c
  78.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  79.  
  80. $(D)\ctvrcu.obj: ..\ctvrcu.c
  81.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  82.  
  83. $(D)\ctinit.obj: ..\ctinit.c
  84.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  85.  
  86. $(D)\ctdelf.obj: ..\ctdelf.c
  87.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  88.  
  89. $(D)\ctclb2.obj: ..\ctclb2.c
  90.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  91.  
  92. $(D)\ctclib.obj: ..\msc\ctclib.c
  93.     copy ..\msc\ctoptn.h ..\msc\ctoptn.sav
  94.     del ..\msc\ctoptn.h
  95.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\msc\$*.c
  96.     copy ..\msc\ctoptn.sav ..\msc\ctoptn.h
  97.  
  98. $(D)\ctslok.obj: ..\ctslok.c    # low level disk interface
  99.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  100.  
  101. $(D)\ctrfio.obj: ctrfio.c    # low level disk interface
  102.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) $*.c
  103.  
  104. $(D)\ctsrve.obj: ..\ctsrve.c
  105.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  106.  
  107. $(D)\ctsprtf.obj: ctsprtf.c
  108.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) $*.c
  109.  
  110. $(D)\ctfulnam.obj: ctfulnam.c
  111.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) $*.c
  112.  
  113. #####################
  114. # build the library #
  115. #####################
  116.  
  117. $(D)\$(SLIB): $(D)\ctvrc2.obj \
  118.             $(D)\ctsrve.obj $(D)\ctsprtf.obj $(D)\ctfulnam.obj \
  119.             $(D)\ctdelk.obj $(D)\ctaddk.obj $(D)\ctupdt.obj \
  120.             $(D)\ctfrac.obj \
  121.             $(D)\ctsrch.obj $(D)\ctdatf.obj $(D)\ctkeyf.obj \
  122.             $(D)\ctkrnl.obj $(D)\ctcomp.obj $(D)\ctvrcu.obj \
  123.             $(D)\ctinit.obj $(D)\ctdelf.obj $(D)\ctclb2.obj \
  124.             $(D)\ctslok.obj $(D)\ctclib.obj $(D)\ctclb3.obj \
  125.             $(D)\ctrfio.obj
  126.     cd $(D)
  127.     del $(LN).bak
  128.     ren $(SLIB) $(LN).bak
  129.     echo $(SLIB) > lrsp
  130.     echo y >> lrsp
  131.     echo +ctvrc2+ctsrve+ctsprtf+ctfulnam & >> lrsp
  132.     echo +ctdelk+ctaddk+ctupdt & >> lrsp
  133.     echo +ctfrac+ctsrch+ctdatf & >> lrsp
  134.     echo +ctkeyf+ctkrnl+ctcomp+ctvrcu & >> lrsp
  135.     echo +ctinit+ctdelf+ctclb2+ctslok+ctclib+ctclb3+ctrfio >> lrsp
  136.     echo $(LN).m >> lrsp
  137.     echo $(SLIB) >> lrsp
  138.     lib @lrsp
  139.     del lrsp
  140.     cd ..
  141.  
  142. ##################################
  143. # compile environment dependent  #
  144. # files for non-dedicated server #
  145. ##################################
  146.  
  147. $(D)\ctsrvr.obj: ..\ctsrvr.c
  148.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  149.  
  150. $(D)\ctsmsg.obj: ctsmsg.c
  151.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) $*.c
  152.  
  153. $(D)\ctnbios.obj: ctnbios.c
  154.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) $*.c
  155.  
  156. $(D)\ctstsr.obj: ctstsr.asm
  157.     $(ASM) $*/ml/D$(AM);
  158.     copy $*.obj $(D)\*.*
  159.     del $*.obj
  160.  
  161. #############################
  162. # link non-dedicated server #
  163. #############################
  164.  
  165. $(D)\ctsrvr.exe: $(D)\ctsrvr.obj $(D)\ctsmsg.obj \
  166.             $(D)\ctnbios.obj $(D)\ctstsr.obj $(D)\$(SLIB)
  167.     cd $(D)
  168.     $(LINK) ctsrvr+ctsmsg+ctnbios+ctstsr/m /NOE $(CP),,,$(LN);
  169.     cd ..
  170.  
  171. ##################################
  172. # compile environment dependent  #
  173. # files for dedicated server     #
  174. ##################################
  175.  
  176. $(D)\ctsmsgfg.obj: ctsmsg.c
  177.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) /DFOREGROUND ctsmsg.c
  178.  
  179. $(D)\ctsfg.obj: ctsfg.asm
  180.     $(ASM) $*/ml/D$(AM);
  181.     copy $*.obj $(D)\*.*
  182.     del $*.obj
  183.  
  184. #############################
  185. # link non-dedicated server #
  186. #############################
  187.  
  188. $(D)\ctsrvrfg.exe: $(D)\ctsrvr.obj $(D)\ctsmsgfg.obj \
  189.             $(D)\ctnbios.obj $(D)\ctsfg.obj $(D)\$(SLIB)
  190.     cd $(D)
  191.     $(LINK) ctsrvr+ctsmsgfg+ctnbios+ctsfg/m /NOE $(CP),ctsrvrfg,ctsrvrfg,$(LN);
  192.     cd ..
  193.  
  194.