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

  1. ######################################################################
  2. # Make library for c-tree server and make ctsrvr.exe and ctsrvrfg.exe
  3. # Invoke with MAKESRV.BAT
  4. #
  5. # For OS2 Lan Manager
  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 ..\os2
  31.  
  32. #linker name
  33. LINK=link
  34.  
  35. #library names
  36. #OS/2 V1.1
  37. #OSLIB=OS2
  38. #OSNETAPI=netapi+netoem
  39. #OS/2 V1.0
  40. OSLIB=DOSCALLS
  41. OSNETAPI=nampipes+netapi+netoem
  42. LN=ctslib
  43.  
  44. #full library name
  45. SLIB=$(LN).lib
  46.  
  47.  
  48. ################################
  49. # complile all library modules #
  50. ################################
  51.  
  52.  
  53. $(D)\ctvrc2.obj: ..\ctvrc2.c
  54.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  55.  
  56. $(D)\ctdelk.obj: ..\ctdelk.c
  57.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  58.  
  59. $(D)\ctaddk.obj: ..\ctaddk.c
  60.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  61.  
  62. $(D)\ctupdt.obj: ..\ctupdt.c
  63.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  64.  
  65. $(D)\ctsrch.obj: ..\ctsrch.c
  66.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  67.  
  68. $(D)\ctfrac.obj: ..\ctfrac.c
  69.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  70.  
  71. $(D)\ctdatf.obj: ..\ctdatf.c
  72.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  73.  
  74. $(D)\ctkeyf.obj: ..\ctkeyf.c
  75.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  76.  
  77. $(D)\ctkrnl.obj: ..\ctkrnl.c
  78.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  79.  
  80. $(D)\ctclb3.obj: ..\ctclb3.c
  81.     $(COMPILER) /Gs $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  82.  
  83. $(D)\ctcomp.obj: ..\ctcomp.c
  84.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  85.  
  86. $(D)\ctvrcu.obj: ..\ctvrcu.c
  87.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  88.  
  89. $(D)\ctinit.obj: ..\ctinit.c
  90.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  91.  
  92. $(D)\ctdelf.obj: ..\ctdelf.c
  93.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  94.  
  95. $(D)\ctclb2.obj: ..\ctclb2.c
  96.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  97.  
  98. $(D)\ctclib.obj: ..\os2\ctclib.c
  99.     copy ..\os2\ctoptn.h ..\os2\ctoptn.sav
  100.     del ..\os2\ctoptn.h
  101.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\os2\$*.c
  102.     copy ..\os2\ctoptn.sav ..\os2\ctoptn.h
  103.  
  104. $(D)\ctslok.obj: ..\ctslok.c    # low level disk interface
  105.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  106.  
  107. $(D)\ctsrve.obj: ..\ctsrve.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)\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.     cd $(D)
  126.     if exist $(LN).bak del $(LN).bak
  127.     if exist $(SLIB) ren $(SLIB) $(LN).bak
  128.     echo $(SLIB) > lrsp
  129.     echo y >> lrsp
  130.     echo +ctvrc2+ctsrve+ctfulnam ^& >> lrsp
  131.     echo +ctdelk+ctaddk+ctupdt ^& >> lrsp
  132.     echo +ctfrac+ctsrch+ctdatf ^& >> lrsp
  133.     echo +ctkeyf+ctkrnl+ctcomp+ctvrcu ^& >> lrsp
  134.     echo +ctinit+ctdelf+ctclb2+ctslok+ctclib+ctclb3 >> lrsp
  135.     echo $(LN).m >> lrsp
  136.     echo $(SLIB) >> lrsp
  137.     lib @lrsp
  138.     del lrsp
  139.     cd ..
  140.  
  141. ##################################
  142. # compile environment dependent  #
  143. # files for non-dedicated server #
  144. ##################################
  145.  
  146. $(D)\ctsrvr.obj: ..\ctsrvr.c
  147.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) ..\$*.c
  148.  
  149. $(D)\ctsmsg.obj: ctsmsg.c
  150.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) $*.c
  151.  
  152. $(D)\ctspip.obj: ctspip.c
  153.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) $*.c
  154.  
  155. $(D)\ctnetnam.obj: ctnetnam.c
  156.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) $*.c
  157.  
  158. $(D)\ctnetc.obj: ctnetc.c
  159.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) $*.c
  160.  
  161. $(D)\ctdosc.obj: ctdosc.c
  162.     $(COMPILER) $(P) /Fo$(D)\$*.obj $(CM) $*.c
  163.  
  164.  
  165. #############################
  166. # link non-dedicated server #
  167. #############################
  168.  
  169. $(D)\ctsrvr.exe: $(D)\ctsrvr.obj $(D)\ctsmsg.obj \
  170.             $(D)\ctspip.obj $(D)\ctnetnam.obj $(D)\ctdosc.obj \
  171.             $(D)\ctnetc.obj $(D)\$(SLIB)
  172.     cd $(D)
  173.     $(LINK) ctsrvr+ctsmsg+ctspip+ctnetnam+ctdosc+ctnetc/m /NOD /NOE,,,$(LN)+$(RUNT)+$(OSLIB)+$(OSNETAPI),..\CTSRVR.DEF;
  174.     cd ..
  175.