make.defs
上传用户:xqtpzdz
上传日期:2022-05-21
资源大小:1764k
文件大小:10k
源码类别:

xml/soap/webservice

开发平台:

Visual C++

  1. # PRODUCT_DOC
  2. #
  3. # Copyright 2004 Vocalocity, Inc. All Rights Reserved.
  4. #
  5. # Make definitions common to all NT make files
  6. #
  7. # Used by: all NT make files
  8. #
  9. #
  10. #----------------
  11. #
  12. # Platform macros
  13. #
  14. # NOTE: By default nmake sets a variable called $(OS) to indicate the
  15. # exact Windows variant. This SWI build system overrides $(OS) to
  16. # simply indicate "win32", and in some rare cases this messes up our
  17. # ability to invoke third party makefiles or Microsoft Visual Studio
  18. # Project Files to delegate builds. Thus we use $(SWIOS) within this
  19. # build system, set $(OS) only for external use in actual Makefiles,
  20. # and allow users to set SUPRESS_OS_SET to suppress this variable
  21. # override in those rare cases.
  22. #
  23. #----------------
  24. !ifndef PROCESSOR_ARCHITECTURE
  25. !error I think you're not using NT. NT defines a PROCESSOR_ARCHITECTURE env. var.
  26. !elseif "$(PROCESSOR_ARCHITECTURE)" != "x86"
  27. !error This is not an Intel architecture machine. This makefile expects Intel.
  28. !else
  29. SWISBSDK = $(SWISBSDK:/=)   # make the env. var friendly to dos commands
  30. CPU=i386
  31. SWIOS=win32
  32. PLATFORM=$(CPU)-$(SWIOS)
  33. !ifndef SUPRESS_OS_SET
  34. OS=$(SWIOS)
  35. !endif
  36. !endif
  37. #====================================================================
  38. # Tools
  39. #====================================================================
  40. BISON = bison -d
  41. CC = cl
  42. MTL = midl.exe
  43. FLEX = flex
  44. LIBRARIAN = lib
  45. LNK = link
  46. YACC = yacc
  47. DOCXX = docxx
  48. DOCIFY = docify
  49. PERL = perl
  50. #====================================================================
  51. # Directories
  52. #====================================================================
  53. BUILD_ROOT = build
  54. BUILD_ROOT_PLT = $(BUILD_ROOT)$(PLATFORM)
  55. BUILDDIR = $(BUILD_ROOT_PLT)$(CFG)
  56. PLATFORMDIR = $(PROJ_ROOT)$(PLATFORM)
  57. MAKEDIRLIST = $(BUILD_ROOT) $(BUILD_ROOT_PLT) $(BUILDDIR) $(BUILDSUBDIRS)
  58. #====================================================================
  59. # Files
  60. #====================================================================
  61. !ifndef MAKEFILE
  62. MAKEFILE = Makefile.NT
  63. !endif
  64. #====================================================================
  65. # Librarian flags
  66. #====================================================================
  67. # nologo         suppresses the title and copyright banner
  68. # machine:IX86   tells the librarian this is for intel machines
  69. # out:           specifies the output file
  70. LIBRARIAN_FLAGS = 
  71.         -nologo 
  72.         -machine:IX86 
  73.         -OUT:$@
  74. #====================================================================
  75. # Browse info-maker flags
  76. #====================================================================
  77. BROWSE_FLAGS = -nologo -n -o $@
  78. #====================================================================
  79. # C/C++ compiler flags
  80. #====================================================================
  81. # nologo     suppresses the title and copyright banner
  82. # c          only compile - don't link
  83. # W3         use warning level 3
  84. # YX         use precompiled headers
  85. # Fp<file>   use <file> for precompiled header data file name
  86. # Fo<file>   output file name is <file>
  87. # Zi         store debug info in a program database file
  88. # Fd<file>   use <file> for program database file name
  89. CFLAGS_GENERAL = 
  90.         -nologo -c 
  91. !if defined(STRICT)
  92.       -W4 
  93. !else
  94.       -W3 
  95. !endif
  96.         -DWIN32 
  97.         -D_$(CPU)_ 
  98.         -D_$(SWIOS)_ 
  99.         -D__THREADED 
  100.         -YX -Fp$(TARGET).pch 
  101.         -Fo$@ 
  102. !if defined(BROWSE)
  103.       -Fr$*.sbr 
  104. !endif
  105. # First get include directories, then other headers from this project
  106. # and only then include SWISBSDK files.
  107.         -I$(PROJ_ROOT)$(PLATFORM)include 
  108.         -I$(PROJ_ROOT)include 
  109.         $(PROJ_CFLAGS) 
  110.       -I"$(SWISBSDK)include"
  111. # /Od  disable optimizations
  112. # /MDd use the multi-threaded, DLL, debug version of the run-time library
  113. CFLAGS_DEBUG = -D_DEBUG -Od -MDd -Zi -Fd$(TARGET).pdb
  114. # /O2  optimize for speed
  115. # /G6  generate code for Pentium Pro
  116. # /MD  use the multi-threaded, DLL version of the run-time library
  117. CFLAGS_RELEASE = -DNDEBUG -O2 -G6 -MD
  118. #====================================================================
  119. # Linker flags
  120. #====================================================================
  121. # nologo           suppresses the title and copyright banner
  122. # machine:IX86     tells the librarian this is for intel machines
  123. # incremental:no   turns off incremental linking
  124. # map              generates a map file
  125. # out:             specifies the output file
  126. # debug            tells the linker this is a debug build
  127. # pdb:<file>       use <file> for the program database
  128. # release          generates a checksum in the image header
  129. LNKFLAGS = 
  130.         -nologo -machine:I386 -incremental:no -fixed:no -MAP 
  131.         kernel32.lib user32.lib advapi32.lib 
  132.         -out:$@ 
  133. !if "$(CFG)" == "debug"
  134.         -debug -pdb:$*.pdb 
  135. !endif
  136.         -release 
  137.       -libpath:"$(SWISBSDK)lib" 
  138. !if defined(PROFILE)
  139.       -profile 
  140. !endif
  141. !if defined(PURIFY)
  142. # Suppress Purify warning messages when using the tool
  143.       -fixed:no 
  144. !endif
  145. !if defined(ALTMON)
  146. # For use internally by Vocalocity crash information
  147.       $(PRODUCT_LIB_PREFIX)mon$(CFG_SUFFIX).lib -INCLUDE:_ALTmonAttach@0 
  148. !endif
  149. !if "$(TARGET_LIBS)" == ""
  150.         $(PROJ_LIBS) 
  151. !else
  152.         $(TARGET_LIBS) 
  153. !endif
  154.       $(MYLFLAGS)
  155. #====================================================================
  156. # Resource compiler flags
  157. #====================================================================
  158. # l <lang-id>   use the language specified by <lang-id>
  159. # Fo<file>      use <file> for output file name
  160. RFLAGS = $(PROJ_RFLAGS) -I"$(SWISBSDK)include" -l 0x409 -Fo$@
  161. #====================================================================
  162. # IDL compiler flags
  163. #====================================================================
  164. # /Oicf         generate stubless proxies
  165. MTLFLAGS = $(PROJ_MTLFLAGS) /Oicf
  166. #====================================================================
  167. # Message compiler flags
  168. #====================================================================
  169. # b             prefix the .bin file name with the source file name
  170. # h             set the directory for the generated header
  171. # r             set the directory for the generated .bin and .rc files
  172. MFLAGS = -b -h $(BUILDDIR) -r $(BUILDDIR)
  173. #====================================================================
  174. # Set up macros for different config's
  175. #====================================================================
  176. !if "$(CFG)" == ""
  177. CFG=debug
  178. !message CFG not defined. Defaulting to debug.
  179. !endif
  180. !if "$(CFG)" == "debug"
  181. CFG_SUFFIX = D
  182. CFLAGS_CFG = $(CFLAGS_DEBUG)
  183. !elseif "$(CFG)" == "release"
  184. CFG_SUFFIX =
  185. CFLAGS_CFG = $(CFLAGS_RELEASE)
  186. !else
  187. !error variable CFG = $(CFG) is not a legal config type.
  188. !endif
  189. #====================================================================
  190. # STL library flags
  191. #====================================================================
  192. # The SWI standard Standard C++ Library (a.k.a. STL) is STLport,
  193. # which implements the ISO C++ standard, as does the GNU GCC 3.x
  194. # compilers we use on Unix. The STL that comes with Microsoft Visual
  195. # C++ is a very old version of Dinkumware that does not implement that
  196. # standard, and has significant known defects. By default, STLport library
  197. # gets used by detecting if STLPORTDIR gets set. If STLPORTDIR isn't either set
  198. # or found then MSVC library gets used. You can also select Microsoft Visual C++ 
  199. # by defining MSVC_STL=1, and you can opt for no STL by defining NO_STL=1 
  200. # (really gives you Microsoft Visual C++ STL since there's no way to disable
  201. # that, but adds a NO_STL define to request your code to use non-STL
  202. # based implementations when available).
  203. #
  204. # Detecting STLport libraries
  205. !ifdef STLPORTDIR
  206. STL_INCLUDE_PATH = "$(STLPORTDIR)stlport"
  207. STL_LIBRARY_CFLAGS = -I$(STL_INCLUDE_PATH) -DSTL_PORT
  208. !if "$(CFG)" == "debug"
  209. !if exist ("$(STLPORTDIR)libstlport_vc6_stldebug.lib")
  210. STL_LIBRARY_LIBS = "$(STLPORTDIR)libstlport_vc6_stldebug.lib"
  211. CFLAGS_DEBUG = $(CFLAGS_DEBUG) -D_STLP_DEBUG -D_STLP_USE_DEBUG_LIB -D_STLP_USE_EXCEPTIONS
  212. !else
  213. !error "Unable to find 'stlport_vc6_stldebug.lib' library file."
  214. !endif
  215. !elseif "$(CFG)" == "release"
  216. !if exist ("$(STLPORTDIR)libstlport_vc6.lib")
  217. STL_LIBRARY_LIBS = "$(STLPORTDIR)libstlport_vc6.lib"
  218. !else
  219. !error "Unable to find 'stlport_vc6.lib' library file."
  220. !endif
  221. !endif
  222. !else
  223. MSVC_STL = 1
  224. !endif
  225. !ifdef NO_STL
  226. STL_INCLUDE_PATH =
  227. STL_LIBRARY_PATH =
  228. STL_LIBRARY_CFLAGS = -DNO_STL
  229. !else
  230. !ifdef MSVC_STL
  231. STL_LIBRARY_CFLAGS = -DSWI_MSVC_STL
  232. !endif
  233. !endif
  234. #====================================================================
  235. # Set up macros for different target type's
  236. #====================================================================
  237. # dll                tells the linker to generate a DLL
  238. # implib:<file>      generates an import library named <file>
  239. # def:<file>         uses the module definition file specified by <file>
  240. LNKFLAGS_DLL = 
  241.         -dll 
  242.         -implib:$*.lib 
  243. !if "$(NO_DEF_FILES)" == ""
  244.         -def:$(TARGET_DEF) 
  245. !endif
  246.       $(STL_LIBRARY_LIBS)
  247. # /subsystem:console      runs under the console subsystem (obsolete?)
  248. LNKFLAGS_CONSOLE = -subsystem:console $(STL_LIBRARY_LIBS)
  249. LIBRARIANFLAGS_LIB =
  250. #====================================================================
  251. # Set final values for these macros
  252. #====================================================================
  253. # we define __STDC__ here as a kludge. We'd like to enforce ANSI code (the
  254. # /Za option) which would implicitly define __STDC__ but this creates all sorts
  255. # of errors/warnings in Microsoft's own windows.h header file.
  256. CFLAGS = -D__STDC__=1 $(CFLAGS_CFG) $(CFLAGS_GENERAL) $(MYCFLAGS)
  257. # GX    enables C++ exception handling
  258. # TP    forces the source file to be compiled as C++
  259. CPPFLAGS = -GX -TP $(CFLAGS_CFG) $(CFLAGS_GENERAL) $(STL_LIBRARY_CFLAGS) 
  260.           $(MYCFLAGS)