home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2005 June (DVD) / DPPRO0605DVD.iso / dotNETSDK / SETUP.EXE / netfxsd1.cab / FL_master_mak________.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Encoding:
Text File  |  2002-08-28  |  9.0 KB  |  337 lines

  1. #Master Make file for QuickStart Samples
  2. #-------------------------------------------
  3.  
  4. #Contains general rules and other setup info
  5.  
  6. !IFNDEF NETSAMPLEPATH
  7. !ERROR Env Variable NETSAMPLEPATH must be defined: Parent directory of QuickStart Samples
  8. !ENDIF
  9.  
  10. #NOTE: this file should be in $(NETSAMPLEPATH)\QuickStart!!
  11. #--------------------------------------------------------------------------
  12. #needed so we can say foo.dll: foo.cpp and it will just work
  13. .SUFFIXES: .tlb .il .dll .cpp .js .cs .vb .rc .ocx .reg .resources .txt .resX .wsdl .asmx
  14.  
  15. #--------------------------------------------------------------------------
  16. #define the names of the compilers we ship
  17. _BC=vbc.exe
  18. _CL=cl.exe
  19. _C1=C1.dll
  20. _CX=c1xx.dll
  21. _C2=c2.dll
  22. _CS=csc.exe
  23. _JS=jsc.exe
  24. _ASSEM=ilasm.exe
  25.  
  26. # Comment this line out to turn debug mode off
  27. DEBUG=TRUE
  28.  
  29. #--------------------------------------------------------------------------
  30. #Setup Standard Windows Forms Imports
  31. # One for C# and one for VB
  32. _CS_WINFORMS_IMPORTS=/R:System.DLL /R:System.Windows.Forms.DLL \
  33.     /R:System.Drawing.DLL
  34. _VB_WINFORMS_IMPORTS=/R:System.DLL /R:System.Windows.Forms.DLL \
  35.     /R:System.Drawing.DLL
  36. _JS_WINFORMS_IMPORTS=/R:System.DLL /R:System.Windows.Forms.DLL \
  37.     /R:System.Drawing.DLL
  38.  
  39. _CS_XML_IMPORTS=/R:System.dll /R:System.Data.dll /R:System.XML.dll
  40. _VB_XML_IMPORTS=/R:System.dll /R:System.Data.dll /R:System.XML.dll
  41. _JS_XML_IMPORTS=/R:System.dll /R:System.Data.dll /R:System.XML.dll
  42.  
  43. _WINFORM_BIN = $(NETSAMPLEPATH)\QuickStart\WinForms\Bin
  44.  
  45. #--------------------------------------------------------------------------
  46. #Use the _MAKE_STOP environment variable if you want NMAKE to stop on error
  47. # if not defined (default), NMAKE will IGNORE errors and continue
  48. !IFNDEF _MAKE_STOP
  49. .IGNORE :
  50. !ENDIF
  51. #---------------------------------------------------------------------------
  52.  
  53. #Allow builds with custom compiler path
  54. !IFDEF CUST_CS
  55. _CS=$(CUST_CS)
  56. !ENDIF
  57.  
  58. #define the names of some common tools
  59. _TLBIMP=tlbimp.exe
  60. _TLBEXP=tlbexp.exe
  61. _REGASM=regasm.exe
  62. _REGSVR=regsvr32.exe
  63. _RSC=rc.exe
  64. _RESGEN=resgen.exe
  65. _AL=al.exe
  66. _SHAREDNAME=sn.exe
  67.  
  68. #IFDEF OS
  69.  
  70. _MAKE_IN_DIR = $(NETSAMPLEPATH)\QuickStart\MakInDir.bat
  71.  
  72. #ELSE
  73.  
  74. _MAKE_IN_DIR = call $(NETSAMPLEPATH)\QuickStart\MakInDir.bat
  75.  
  76. #ENDIF
  77.  
  78. _GACUTIL=gacutil.exe
  79. _WSDL=wsdl.exe
  80. _XSD=xsd.exe
  81.  
  82. #define our basic link line for managed code
  83. _LINK=link.exe /entry:main
  84.  
  85. #define our basic core lib
  86. _LIBS=mscoree.lib
  87.  
  88. #this is used for compiling C# samples
  89. #reset this in individual sample makefile to your imports if required
  90. _IMPORTS=
  91.  
  92. #this is used for compiling C# samples, that use Resources
  93. #reset this in individual sample makefile to your resource imports if required
  94. _WIN32RES=
  95.  
  96. #This is used for compiling C# samples that use Assembly and key files
  97. #reset this in individual sample makefile to your resource imports if required
  98. _KEYFILE=
  99.  
  100. #this is used for compiling C# samples
  101. #set the default out directory to .
  102. _OUTDIR=.
  103.  
  104. #Set what to clean by default
  105. !IFNDEF _CLEANFILES
  106. _CLEANFILES=*.obj *.tlb *.reg
  107. !ENDIF
  108.  
  109. #set some command C++ flags
  110. _CCFLAGS=/clr
  111. _CFLAGS=$(_CCFLAGS) /c
  112.  
  113. #set debug as the default for c++
  114. _CDFLAGS=$(_CFLAGS) /Zi
  115.  
  116. #set some command link flags
  117. _LFLAGS=-noentry -assemblydebug
  118. _LDFLAGS=-noentry -assemblydebug -dll
  119.  
  120. !IFDEF DEBUG
  121.  
  122. _CS_DLL_FLAGS=/nologo /t:library /debug+ $(TRACE)
  123. _CS_EXE_FLAGS=/nologo /t:exe /debug+  $(TRACE)
  124.  
  125. _VB_DLL_FLAGS=/nologo /t:library /debug+ $(TRACE)
  126. _VB_EXE_FLAGS=/nologo /t:exe /debug+  $(TRACE)
  127.  
  128. _JS_DLL_FLAGS=/nologo /t:library /debug+ $(TRACE)
  129. _JS_EXE_FLAGS=/nologo /t:exe /debug+ $(TRACE)
  130. _RESGEN_FLAGS=
  131.  
  132. !ELSE
  133.  
  134. _CS_DLL_FLAGS=/nologo /t:library $(TRACE)
  135. _CS_EXE_FLAGS=/nologo $(TRACE)
  136. _VB_DLL_FLAGS=/nologo /t:library $(TRACE)
  137. _VB_EXE_FLAGS=/nologo /t:exe $(TRACE)
  138. _JS_DLL_FLAGS=/nologo $(TRACE)
  139. _JS_EXE_FLAGS=/nologo /exe $(TRACE)
  140. _RESGEN_FLAGS=
  141.  
  142. !ENDIF
  143.  
  144. !IFDEF OS
  145.  
  146. _RMDIR=rd /s /q
  147.  
  148. !ELSE
  149.  
  150. _RMDIR=deltree /y
  151.  
  152. !ENDIF
  153.  
  154. #default compile and link for c++ files building a dll
  155. #note: name.cpp and name.dll must match
  156. .cpp.dll:
  157.   if not exist $(_OUTDIR) md $(_OUTDIR)
  158.   $(_CL) $(_CDFLAGS) $*.cpp
  159.   $(_LINK) $(_LDFLAGS) $(_LIBS) $*.obj
  160.  
  161. #default compile and link for c++ files building a exe
  162. #note: name.cpp and name.dll must match
  163. .cpp.exe:
  164.   if not exist $(_OUTDIR) md $(_OUTDIR)
  165.   $(_CL) $(_CDFLAGS) $*.cpp
  166.   $(_LINK) $(_LFLAGS) $(_LIBS) $*.obj
  167.  
  168. #default compile and link for c++ files building an obj
  169. #note: name.cpp and name.obj must match
  170. .cpp.obj:
  171.   $(_CL) $(_CDFLAGS) $*.cpp
  172.  
  173. #default compile and link for c++ files building an exe
  174. #note: name.obj and name.exe must match
  175. .obj.exe:
  176.   $(_LINK) $(_LFLAGS) $(_LIBS) $**
  177.  
  178. #default compile and link for c++ files building a dll
  179. .obj.dll:
  180.   $(_LINK) $(_LDFLAGS) $(_LIBS) $*.obj
  181.  
  182. #default compiling vb files
  183. .vb.dll:
  184.   if not exist $(_OUTDIR) md $(_OUTDIR)
  185.   $(_BC) $(_VB_DLL_FLAGS) $(_IMPORTS)  /out:$(_OUTDIR)\$@ $** $(NETSAMPLEPATH)\QuickStart\QSVersion.vb $(_WIN32RES) $(_KEYFILE)
  186.  
  187. .vb.exe:
  188.   if not exist $(_OUTDIR) md $(_OUTDIR)
  189.   $(_BC) $(_VB_EXE_FLAGS) $(_IMPORTS)  /out:$(_OUTDIR)\$@ $** $(NETSAMPLEPATH)\QuickStart\QSVersion.vb $(_WIN32RES) $(_KEYFILE)
  190.  
  191. #default compiling C# files
  192. .cs.dll:
  193.   if not exist $(_OUTDIR) md $(_OUTDIR)
  194.   $(_CS) $(_CS_DLL_FLAGS) $(_IMPORTS) /out:$(_OUTDIR)\$@ $** $(NETSAMPLEPATH)\QuickStart\QSVersion.cs $(_WIN32RES) $(_KEYFILE)
  195.  
  196.  
  197. #default compiling C# files
  198. .cs.exe:
  199.   if not exist $(_OUTDIR) md $(_OUTDIR)
  200.   $(_CS) $(_CS_EXE_FLAGS) $(_IMPORTS) /out:$(_OUTDIR)\$@ $** $(NETSAMPLEPATH)\QuickStart\QSVersion.cs $(_WIN32RES) $(_KEYFILE)
  201.  
  202.  
  203. #default compiling C# files
  204. .js.dll:
  205.   if not exist $(_OUTDIR) md $(_OUTDIR)
  206.   $(_JS) $(_JS_DLL_FLAGS) $(_IMPORTS) /out:$(_OUTDIR)\$@ $** $(NETSAMPLEPATH)\QuickStart\QSVersion.js $(_WIN32RES) $(_KEYFILE)
  207.  
  208.  
  209. #default compiling C# files
  210. .js.exe:
  211.   if not exist $(_OUTDIR) md $(_OUTDIR)
  212.   $(_JS) $(_JS_EXE_FLAGS) $(_IMPORTS) /out:$(_OUTDIR)\$@ $** $(NETSAMPLEPATH)\QuickStart\QSVersion.js $(_WIN32RES) $(_KEYFILE)
  213.  
  214. #default for registering an ocx
  215.  
  216. .ocx.reg:
  217.   $(_REGSVR) /s $*.ocx
  218.  
  219. #define for compiling il to an exe
  220. .il.exe:
  221.   $(_ASSEM) $*.il
  222.  
  223. #define for compiling il to a dll
  224. .il.dll:
  225.   $(_ASSEM) $*.il /DLL
  226.  
  227. #define for compiling asm to an exe
  228. .asm.exe:
  229.   $(_ASSEM) $*.asm
  230.  
  231. #define for compiling asm to an exe
  232. .asm.dll:
  233.   $(_ASSEM) $*.asm /DLL
  234.  
  235. #define for compiling Service Desc Language to C# (names must match (files & classes))
  236. .wsdl.cs:
  237. !IFDEF _NAMESPACE
  238. !IFDEF _SDLPATH
  239.         $(_WSDL) /l:CS /n:$(_NAMESPACE) /out:$*.cs $(_SDLPATH)
  240. !ELSE
  241.         $(_WSDL) /l:CS /n:$(_NAMESPACE) /out:$*.cs $**
  242. !ENDIF
  243. !ELSE
  244. !IFDEF _SDLPATH
  245.         $(_WSDL) /l:CS /n:$* /out:$*.cs $(_SDLPATH)
  246. !ELSE
  247.         $(_WSDL) /l:CS /n:$* /out:$*.cs $**
  248. !ENDIF
  249. !ENDIF
  250.  
  251. #define for compiling Service Desc Language to JScript (names must match (files & classes))
  252. .wsdl.js:
  253. !IFDEF _NAMESPACE
  254. !IFDEF _SDLPATH
  255.         $(_WSDL) /l:JS /n:$(_NAMESPACE) /out:$*.js $(_SDLPATH)
  256. !ELSE
  257.         $(_WSDL) /l:JS /n:$(_NAMESPACE) /out:$*.js $**
  258. !ENDIF
  259. !ELSE
  260. !IFDEF _SDLPATH
  261.         $(_WSDL) /l:JS /n:$*JS /out:$*.js $(_SDLPATH)
  262. !ELSE
  263.         $(_WSDL) /l:JS /n:$*JS /out:$*.js $**
  264. !ENDIF
  265. !ENDIF
  266.  
  267. #define for compiling Service Desc Language to VB (names must match (files & classes))
  268. .wsdl.vb:
  269. !IFDEF _NAMESPACE
  270. !IFDEF _SDLPATH
  271.         $(_WSDL) /l:VB /n:$(_NAMESPACE) /out:$*.vb $(_SDLPATH)
  272. !ELSE
  273.         $(_WSDL) /l:VB /n:$(_NAMESPACE) /out:$*.vb $**
  274. !ENDIF
  275. !ELSE
  276. !IFDEF _SDLPATH
  277.         $(_WSDL) /l:VB /n:$*VB /out:$*.vb $(_SDLPATH)
  278. !ELSE
  279.         $(_WSDL) /l:VB /n:$*VB /out:$*.vb $**
  280. !ENDIF
  281. !ENDIF
  282.  
  283. #define for compiling Service Desc Language from Web Service to JS
  284. .asmx.js:
  285. !IFDEF _NAMESPACE
  286. !IFDEF _SDLPATH
  287.         $(_WSDL) /l:JS /n:$(_NAMESPACE) /out:$*.js $(_SDLPATH)
  288. !ELSE
  289.         $(_WSDL) /l:JS /n:$(_NAMESPACE) /out:$*.js $**
  290. !ENDIF
  291. !ELSE
  292. !IFDEF _SDLPATH
  293.         $(_WSDL) /l:JS /n:$*JS /out:$*.js $(_SDLPATH)
  294. !ELSE
  295.         $(_WSDL) /l:JS /n:$*JS /out:$*.js $**
  296. !ENDIF
  297. !ENDIF
  298.  
  299. #define for compiling Service Desc Language from Web Service to CSharp
  300. .asmx.cs:
  301. !IFDEF _NAMESPACE
  302. !IFDEF _SDLPATH
  303.         $(_WSDL) /l:CS /n:$(_NAMESPACE) /out:$*.cs $(_SDLPATH)
  304. !ELSE
  305.         $(_WSDL) /l:CS /n:$(_NAMESPACE) /out:$*.cs $**
  306. !ENDIF
  307. !ELSE
  308. !IFDEF _SDLPATH
  309.         $(_WSDL) /l:CS /n:$* /out:$*.cs $(_SDLPATH)
  310. !ELSE
  311.         $(_WSDL) /l:CS /n:$* /out:$*.cs $**
  312. !ENDIF
  313. !ENDIF
  314.  
  315. #define for compiling Service Desc Language from Web Service to VB
  316. .asmx.vb:
  317. !IFDEF _NAMESPACE
  318. !IFDEF _SDLPATH
  319.         $(_WSDL) /l:VB /n:$(_NAMESPACE) /out:$*.vb $(_SDLPATH)
  320. !ELSE
  321.         $(_WSDL) /l:VB /n:$(_NAMESPACE) /out:$*.vb $**
  322. !ENDIF
  323. !ELSE
  324. !IFDEF _SDLPATH
  325.         $(_WSDL) /l:VB /n:$*VB /out:$*.vb $(_SDLPATH)
  326. !ELSE
  327.         $(_WSDL) /l:VB /n:$*VB /out:$*.vb $**
  328. !ENDIF
  329. !ENDIF
  330.  
  331. #define for compiling RESX files to resource files using Resgen
  332. .resX.resources:
  333.   $(_RESGEN) $(_RESGEN_FLAGS) $*.resX $*.resources
  334.  
  335. #define for compiling .TXT files to resource files using Resgen
  336. .txt.resources:
  337.   $(_RESGEN) $(_RESGEN_FLAGS) $*.txt $*.resources