home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / k95source / k95inst.mak < prev    next >
Makefile  |  2020-01-01  |  10KB  |  156 lines

  1. # Visual C++ 2.x, 4.x, and 5.x makefile                               
  2.                                                                       
  3. # Does not depend on the presence of any environment variables in     
  4. # order to compile tcl; all needed information is derived from        
  5. # location of the compiler directories.                               
  6.                                                                       
  7. # Project directories                                                 
  8. #                                                                     
  9. # TOOLS32 = location of VC++ 32-bit development tools. Note that the  
  10. #        VC++ 2.0 header files are broken, so you need to use the  
  11. #        ones that come with the developer network CD's, or later  
  12. #        versions of VC++.                                         
  13. #                                                                     
  14.                                                                       
  15. !IFNDEF TOOLS32                                                       
  16. TOOLS32        = f:\visual_studio\vc98\
  17. !ENDIF                                                                
  18.                                                                       
  19. # Set this to the appropriate value of /MACHINE: for your platform    
  20. MACHINE    = IX86                                                        
  21.                                                                       
  22. # Comment the following line to compile with symbols                  
  23. # NODEBUG=1                                                             
  24.                                                                       
  25. ######################################################################
  26. # Do not modify below this line                                       
  27. ######################################################################
  28.                                                                       
  29. ZLIB_LIB    = k95inst.lib
  30. ZLIB_DLL    = k95inst.dll                                            
  31.                                                                       
  32. ZLIB_OBJS       = k95inst.obj      
  33.                                                                       
  34. cc32        = $(TOOLS32)\bin\cl.exe                               
  35. link32        = $(TOOLS32)\bin\link.exe                             
  36. rc32        = $(TOOLS32)\bin\rc.exe                               
  37. nmake        = $(TOOLS32)\bin\nmake.exe                            
  38. include32    = -I$(TOOLS32)\include                                
  39.                                                                       
  40. DEFINES    = -D__WIN32__ -DWIN32 $(DEBUGDEFINES)                         
  41.                                                                       
  42. CFLAGS    = $(cdebug) $(cflags) $(cvarsdll) $(include32) \
  43.             $(INCLUDES) $(DEFINES)                        
  44. CON_CFLAGS    = $(cdebug) $(cflags) $(cvars) $(include32) -DCONSOLE 
  45. DOS_CFLAGS    = $(cdebug) $(cflags) $(include16) -AL                
  46. DLL16_CFLAGS    = $(cdebug) $(cflags) $(include16) -ALw               
  47.                                                                       
  48. ######################################################################
  49. # Link flags                                                          
  50. ######################################################################
  51.                                                                       
  52. !IFDEF NODEBUG                                                        
  53. ldebug = /RELEASE                                                     
  54. !ELSE                                                                 
  55. ldebug = -debug:full -debugtype:cv                                    
  56. !ENDIF                                                                
  57.                                                                       
  58. # declarations common to all linker options                           
  59. lcommon = /NODEFAULTLIB /RELEASE /NOLOGO                              
  60.                                                                       
  61. # declarations for use on Intel i386, i486, and Pentium systems       
  62. !IF "$(MACHINE)" == "IX86"                                            
  63. DLLENTRY = @12                                                        
  64. lflags   = $(lcommon) -align:0x1000 /MACHINE:$(MACHINE)               
  65. !ELSE                                                                 
  66. lflags   = $(lcommon) /MACHINE:$(MACHINE)                             
  67. !ENDIF                                                                
  68.                                                                       
  69. conlflags = $(lflags) -subsystem:console -entry:mainCRTStartup        
  70. guilflags = $(lflags) -subsystem:windows -entry:WinMainCRTStartup     
  71. dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll       
  72.                                                                       
  73. !IF "$(MACHINE)" == "PPC"                                             
  74. libc = libc.lib                                                       
  75. libcdll = crtdll.lib                                                  
  76. !ELSE                                                                 
  77. libc = libc.lib oldnames.lib                                          
  78. libcdll = msvcrt.lib oldnames.lib                                     
  79. !ENDIF                                                                
  80.                                                                       
  81. baselibs   = kernel32.lib $(optlibs) advapi32.lib winspool.lib
  82. winlibs    = $(baselibs) user32.lib gdi32.lib comdlg32.lib
  83.                                                                       
  84. guilibs       = $(libc) $(winlibs)                                       
  85. conlibs       = $(libc) $(baselibs)                                      
  86. guilibsdll = $(libcdll) $(winlibs)                                    
  87. conlibsdll = $(libcdll) $(baselibs)                                    
  88.                                                                       
  89. ######################################################################
  90. # Compile flags                                                       
  91. ######################################################################
  92.                                                                       
  93. !IFDEF NODEBUG                                                        
  94. cdebug = -Ox                                                          
  95. !ELSE                                                                 
  96. cdebug = -Z7 -Od                                                      
  97. !ENDIF                                                                
  98.                                                                       
  99. # declarations common to all compiler options                         
  100. ccommon = -c -W3 -nologo -YX -Dtry=__try -Dexcept=__except            
  101.                                                                       
  102. !IF "$(MACHINE)" == "IX86"                                            
  103. cflags = $(ccommon) -D_X86_=1 -J
  104. !ELSE                                                                 
  105. !IF "$(MACHINE)" == "MIPS"                                            
  106. cflags = $(ccommon) -D_MIPS_=1 -J
  107. !ELSE                                                                 
  108. !IF "$(MACHINE)" == "PPC"                                             
  109. cflags = $(ccommon) -D_PPC_=1 -J
  110. !ELSE                                                                 
  111. !IF "$(MACHINE)" == "ALPHA"                                           
  112. cflags = $(ccommon) -D_ALPHA_=1 -J
  113. !ENDIF                                                                
  114. !ENDIF                                                                
  115. !ENDIF                                                                
  116. !ENDIF                                                                
  117.                                                                       
  118. cvars      = -DWIN32 -D_WIN32                                         
  119. cvarsmt    = $(cvars) -D_MT                                           
  120. cvarsdll   = $(cvarsmt) -D_DLL                                        
  121.                                                                       
  122. ######################################################################
  123. # Project specific targets                                            
  124. ######################################################################
  125.                                                                       
  126. release:    $(ZLIB_DLL) $(ZLIB_LIB)                                   
  127. all:        $(ZLIB_DLL) $(ZLIB_LIB)                                   
  128.                                                                       
  129. $(ZLIB_DLL): $(ZLIB_OBJS) k95inst.def
  130.     set LIB=$(TOOLS32)\lib                                        
  131.     $(link32) $(ldebug) $(dlllflags) -def:k95inst.def \
  132.         -out:$@ $(guilibsdll)  @<<                             
  133. $(ZLIB_OBJS)                                                          
  134. <<                                                                    
  135.                                                                       
  136. $(ZLIB_LIB): $(ZLIB_DLL)                                              
  137.                                                                       
  138. #                                                                     
  139. # Implicit rules                                                      
  140. #                                                                     
  141.                                                                       
  142. .c.obj:                                                               
  143.     $(cc32) $(CFLAGS) $<                                              
  144.                                                                       
  145. clean:                                                                
  146.     -@del *~                                                      
  147.     -@del *.ncb                                                   
  148.         -@del *.exp                                                   
  149.     -@del *.lib                                                   
  150.     -@del *.dll                                                   
  151.     -@del *.exe                                                   
  152.         -@del *.obj                                                   
  153.         -@del *.res                                                   
  154.     -@del *.pch                                                   
  155.     -@del *.plg                                                   
  156.