Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

220 lines
5.9 KiB

  1. #=------------------------------------------------------------------------=
  2. # VB55CTLS.inc
  3. #=------------------------------------------------------------------------=
  4. # builds a control for the vb5 product. adds a few pieces of functionality
  5. # to the generic makectl.inc
  6. #=------------------------------------------------------------------------=
  7. # NOTE:
  8. #
  9. # variable definitions before the !include line, and new targets, etc,
  10. # afterwards.
  11. #
  12. #=------------------------------------------------------------------------=
  13. #=------------------------------------------------------------------------=
  14. # variable definitions
  15. #
  16. !if "$(_SERVERFILENAME)"==""
  17. _SERVERFILENAME=$(CONTROLNAME).Ocx
  18. !endif
  19. # Relative path to the INTL, satellite DLL build, directory
  20. #
  21. INTLPATH=.\.
  22. VBLICPATH=..\..\VBLIC
  23. !if "$(TOOLS)"==""
  24. TOOLS=TOOLS
  25. !endif
  26. !if "$(C32)"==""
  27. C32=C32
  28. !endif
  29. IDHEADER=..\..\tools\idheader.bat
  30. DEPFILE=..\..\tools\depfile.bat
  31. #
  32. # base address file
  33. BASEFILE=$(DEVBINC)\vstudio\v6\dllbase.txt
  34. !if "$(INTLBLD)"!=""
  35. ALLTARGETS=dwinvers.h $(INTLPATH)\$(_LOCALEBASENAME)xxx.DLL \
  36. !elseif "$(DEPFILEBLD)"!=""
  37. ALLTARGETS=$(_SERVERBASENAME).DEP
  38. !else
  39. ALLTARGETS=$(VB55CTLS)\dwinvers.h \
  40. !if "$(_NOID)" == ""
  41. Helpstrs.H \
  42. !endif
  43. $(_SERVERFILENAME) \
  44. !if "$(ASDEBUG)"=="" && "$(ASICECAP)"==""
  45. Lego
  46. !endif
  47. !endif
  48. TLBTARGETS= \
  49. !if "$(_NOID)" == ""
  50. HelpStrs.H \
  51. !endif
  52. ..\$(CONTROLNAME).ODL
  53. # licensing support
  54. #
  55. !if "$(ASDEBUG)"!=""
  56. _LIBS=$(_LIBS) $(VBLICPATH)\debug\vblic.lib
  57. !elseif "$(ASICECAP)"!=""
  58. _LIBS=$(_LIBS) $(VBLICPATH)\icecap\vblic.lib
  59. !else
  60. _LIBS=$(_LIBS) $(VBLICPATH)\release\vblic.lib
  61. !endif
  62. #=------------------------------------------------------------------------=
  63. # extra compiler flags, etc.
  64. #
  65. !if "$(ASDEBUG)"!=""
  66. #
  67. # debug
  68. #
  69. _LFLAGS=$(_LFLAGS) -map:$(_SERVERBASENAME).map
  70. !if "$(PROCESSOR_ARCHITECTURE)"=="ALPHA"
  71. _CFLAGS = $(_CFLAGS) /QAieee
  72. !endif
  73. !else if "$(ASICECAP)"!=""
  74. #
  75. # icecap
  76. #
  77. _LFLAGS=$(_LFLAGS) -map:$(_SERVERBASENAME).map
  78. !else
  79. #
  80. # release
  81. #
  82. _LFLAGS=$(_LFLAGS) -debugtype:fixup,cv -debug:notmapped,full -debugtype:coff -map:$(_SERVERBASENAME).map
  83. !if "$(PROCESSOR_ARCHITECTURE)"=="ALPHA"
  84. _CFLAGS = $(_CFLAGS) /QAl /QAieee
  85. !endif
  86. !endif
  87. !if "$(_NOBASE)"==""
  88. !if "$(_BASEADDRNAME)"==""
  89. #default base address name is the name of the control
  90. !if "$(ASDEBUG)"!=""
  91. _LFLAGS=$(_LFLAGS) -base:@$(BASEFILE),$(CONTROLNAME)_d
  92. !else
  93. _LFLAGS=$(_LFLAGS) -base:@$(BASEFILE),$(CONTROLNAME)_r
  94. !endif
  95. !else
  96. #using custom base address name
  97. !if "$(ASDEBUG)"!=""
  98. _LFLAGS=$(_LFLAGS) -base:@$(BASEFILE),$(_BASEADDRNAME)_d
  99. !else
  100. _LFLAGS=$(_LFLAGS) -base:@$(BASEFILE),$(_BASEADDRNAME)_r
  101. !endif
  102. !endif
  103. !endif
  104. #
  105. # The CTLS_BROWSE environment variable turns on/off the compilation of a
  106. # browse file. Set CTLS_BROWSE to something and one will be generated.
  107. !if "$(CTLS_BROWSE)"!=""
  108. CFLAGS=$(CFLAGS) /FR
  109. BSCMAKE=bscmake.exe
  110. !endif
  111. #=------------------------------------------------------------------------=
  112. # put all variable definitions before this, and new targets afterwards
  113. #
  114. !include "..\..\Include\MakeCtl.Inc"
  115. #=------------------------------------------------------------------------=
  116. # new targets
  117. #
  118. VBDep: HelpStrs.H dep
  119. #-----------------------------------------------------------------------
  120. # Build dwinvers.h
  121. #-----------------------------------------------------------------------
  122. $(VB55CTLS)\dwinvers.h : $(VB55CTLS)\dwinvers.txt
  123. echo Building dwinvers.h
  124. $(MAKEVERS) > $(VB55CTLS)\dwinvers.h < $(VB55CTLS)\dwinvers.txt
  125. $(THUNDER55)\$(TOOLS)\bin\getver $(THUNDER55)\$(C32)\dll\vba6\vba6.dll VBA >> $(VB55CTLS)\dwinvers.h
  126. copy $(VB55CTLS)\dwinvers.h $(VB55CTLS)\framewrk
  127. # helpstr/id support
  128. #
  129. !if "$(_NOID)" == ""
  130. HelpStrs.H : ..\$(CONTROLNAME).ID
  131. echo Generating HelpIDs.H, HelpStrs.H and HelpStrs.RC
  132. $(IDHEADER) ..\$(CONTROLNAME).id helpids.h helpstrs.h helpstrs.rc > nul
  133. !endif
  134. !if "$(_SERVERBASENAME)"==""
  135. !message _SERVERBASENAME not set
  136. !endif
  137. !if "$(_SERVEREXTENSION)"==""
  138. !message _SERVEREXTENSION not set
  139. !endif
  140. !if "$(INTLBLD)"!=""
  141. # Localized DLL build
  142. #
  143. !if "$(_LOCALEBASENAME)"==""
  144. !message _LOCALEBASENAME not set
  145. !endif
  146. !if "$(_NOBASE)" == ""
  147. !if "$(_INTLBASEADDRNAME)"==""
  148. #default base address name to the name of the control
  149. _LFLAGS_INTL=-base:@$(DEVBINC)\vstudio\v6\dllbase.txt,$(CONTROLNAME)_intl
  150. !else
  151. #using custom base address name
  152. _LFLAGS_INTL=-base:@$(DEVBINC)\vstudio\v6\dllbase.txt,$(_INTLBASEADDRNAME)_intl
  153. !endif
  154. !endif
  155. !if "$(_NOID)" == ""
  156. $(INTLPATH)\HelpStrs.RC : ..\$(CONTROLNAME).ID
  157. echo Generating HelpStrs.RC
  158. $(IDHEADER) ..\$(CONTROLNAME).id $(INTLPATH)\helpids.h $(INTLPATH)\helpstrs.h $(INTLPATH)\helpstrs.rc > nul
  159. !endif
  160. $(INTLPATH)\intl.res : $(INTLPATH)\intl.rc
  161. echo Compiling satellite DLL resources ...
  162. rc -dINTLBUILD $(INCPATH) $(_RCFLAGS) -fo $(INTLPATH)\intl.res $(INTLPATH)\intl.rc
  163. $(INTLPATH)\intl.rbj : $(INTLPATH)\intl.res
  164. !ifdef RISC_BLD
  165. cvtres -machine:$(PROCESSOR_ARCHITECTURE) -nologo -out:$(INTLPATH)\intl.rbj $(INTLPATH)\intl.res
  166. !else
  167. cvtres -machine:ix86 -nologo -out:$(INTLPATH)\intl.rbj $(INTLPATH)\intl.res
  168. !endif
  169. $(INTLPATH)\$(_LOCALEBASENAME)xxx.DLL : \
  170. !if "$(_NOID)" == ""
  171. $(INTLPATH)\helpstrs.rc \
  172. !endif
  173. $(INTLPATH)\intl.rbj
  174. echo Linking satellite DLL ...
  175. link -nologo $(_LFLAGS_INTL) -out:$(INTLPATH)\$(_LOCALEBASENAME)xxx.DLL -DLL -subsystem:windows,4.00 -nodefaultlib -machine:$(PROCESSOR_ARCHITECTURE) -noentry $(INTLPATH)\intl.rbj
  176. !endif //INTLBLD
  177. Lego:
  178. !if "$(CTLS_LEGO)"=="YES" && "$(_SERVERBASENAME)"!="Crystl32"
  179. nmake -f $(THUNDER55)\common\instr.mak FILE_BASE=$(_SERVERBASENAME) FILE_EXTENSION=$(_SERVEREXTENSION) CMD_SCRIPT= BOOT_SYM=
  180. !endif
  181. # Dependency File Build
  182. #
  183. $(_SERVERBASENAME).DEP : $(_SERVERBASENAME).TPL $(VB55CTLS)\dwinvers.txt $(VB55CTLS)\dwinvers.h
  184. echo Generating Setup Wizard dependency file
  185. $(DEPFILE) $(_SERVERBASENAME).tpl $(_SERVERBASENAME).dep
  186. del $(_SERVERBASENAME).dep.suc