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.

335 lines
9.3 KiB

  1. # Perl script for creating and maintaining RichEdit makefiles
  2. ###
  3. # Main script
  4. ###
  5. &build_makefile();
  6. sub build_makefile {
  7. open(MAKEFILE, ">makefile");
  8. print MAKEFILE <<"EOT"
  9. # NT build environment
  10. # Allow for customization through a decoration file
  11. !IFDEF NTMAKEENV
  12. !include \$(NTMAKEENV)\\makefile.def
  13. !ENDIF
  14. !IF EXIST("makefile.cfg")
  15. !INCLUDE "makefile.cfg"
  16. !ENDIF
  17. # The following builds are supported
  18. !IF "\$(BUILD)" == ""
  19. BUILD=w32_x86_dbg
  20. !MESSAGE No Build specified. Defaulting to w32_x86_dbg
  21. !ENDIF
  22. !IF "\$(ODIR)" == ""
  23. ODIR = .\\
  24. !MESSAGE No output directory specified. Defaulting to current directory
  25. !ENDIF
  26. !IF "\$(BUILD)" == "w32_x86_dbg"
  27. INCLUDE = \$(INCLUDE)
  28. CFLAGS = -DDEBUG -Od
  29. CFLAGS = \$(CFLAGS) -DWIN32 -D_WINDOWS -D_X86_ -DWINNT
  30. CFLAGS = \$(CFLAGS) -Gz -Gm -Zi
  31. LFLAGS =
  32. LFLAGS = \$(LFLAGS) ..\\lib\\x86\\msls31d.lib delayimp.lib -delayload:msls31d.dll
  33. LFLAGS = \$(LFLAGS) ..\\lib\\x86\\usp10.lib -delayload:usp10.dll -delay:unload
  34. LFLAGS = \$(LFLAGS) kernel32.lib
  35. LFLAGS = \$(LFLAGS) advapi32.lib
  36. LFLAGS = \$(LFLAGS) gdi32.lib
  37. LFLAGS = \$(LFLAGS) user32.lib
  38. LFLAGS = /entry:DllMain\@12 /debug \$(LFLAGS)
  39. CPP = cl \$(CFLAGS)
  40. CL = cl \$(CFLAGS)
  41. RCFLAGS= \$(USERRCFLAGS) -dINCLUDETLB -dDEBUG
  42. LINKER = link
  43. CHKSTK = ..\\lib\\x86\\chkstk.obj
  44. FTOL = ..\\lib\\x86\\ftol.obj
  45. MEMMOVE = ..\\lib\\x86\\memmove.obj
  46. MEMSET = ..\\lib\\x86\\memset.obj
  47. MEMCMP = ..\\lib\\x86\\memcmp.obj
  48. MEMCPY = ..\\lib\\x86\\memcpy.obj
  49. STRLEN = ..\\lib\\x86\\strlen.obj
  50. !ELSEIF "\$(BUILD)" == "w32_x86_shp"
  51. INCLUDE = \$(INCLUDE)
  52. CFLAGS = -O1 \$(USERDEFS)
  53. CFLAGS = \$(CFLAGS) -DWIN32 -D_WINDOWS -D_X86_ -DWINNT
  54. CFLAGS = \$(CFLAGS) -GFz
  55. LFLAGS =
  56. LFLAGS = \$(LFLAGS) ..\\lib\\x86\\msls31.lib delayimp.lib -delayload:msls31.dll
  57. LFLAGS = \$(LFLAGS) ..\\lib\\x86\\usp10.lib -delayload:usp10.dll -delay:unload
  58. LFLAGS = \$(LFLAGS) kernel32.lib
  59. LFLAGS = \$(LFLAGS) advapi32.lib
  60. LFLAGS = \$(LFLAGS) gdi32.lib
  61. LFLAGS = \$(LFLAGS) user32.lib
  62. LFLAGS = /opt:ref /incremental:no /entry:DllMain\@12 \$(LFLAGS)
  63. CPP = cl \$(CFLAGS)
  64. CL = cl \$(CFLAGS)
  65. LINKER = link
  66. RCFLAGS= \$(USERRCFLAGS) -dINCLUDETLB
  67. CHKSTK = ..\\lib\\x86\\chkstk.obj
  68. FTOL = ..\\lib\\x86\\ftol.obj
  69. MEMMOVE = ..\\lib\\x86\\memmove.obj
  70. MEMSET = ..\\lib\\x86\\memset.obj
  71. MEMCMP = ..\\lib\\x86\\memcmp.obj
  72. MEMCPY = ..\\lib\\x86\\memcpy.obj
  73. STRLEN = ..\\lib\\x86\\strlen.obj
  74. !ELSEIF "\$(BUILD)" == "wce_x86em_dbg"
  75. PATH = \\msdev\\wce\\bin;\$(PATH)
  76. PATH = \\Program^ Files\\DevStudio\\wce\\bin;\$(PATH)
  77. INCLUDE = ..\\wceinc
  78. LIB = ..\\wcelib\\x86\\common\\ce\\debug
  79. LIB = \$(LIB);\\msdev\\wce\\lib\\x86em
  80. LIB = \$(LIB);\\Program^ Files\\DevStudio\\wce\\lib\\wce100\\x86em
  81. LIB = \$(LIB);\\msdev\\lib
  82. CFLAGS = -DDEBUG -Od
  83. CFLAGS = \$(CFLAGS) -DWIN32 -D_WINDOWS -DPEGASUS
  84. CFLAGS = \$(CFLAGS) -D_X86_ -Dx86 -DUNDER_NT
  85. CPP = cl \$(CFLAGS)
  86. CL = cl \$(CFLAGS)
  87. LINKER = cl
  88. LFLAGS = \$(LFLAGS) coredll.lib user32.lib
  89. LFLAGS = -entry:_DllMainCRTStartup -ignore:4078 \$(LFLAGS)
  90. !ELSEIF "\$(BUILD)" == "wce_x86em_shp"
  91. PATH = \\msdev\\wce\\bin;\$(PATH)
  92. PATH = \\Program^ Files\\DevStudio\\wce\\bin;\$(PATH)
  93. INCLUDE = ..\\wceinc
  94. LIB = ..\\wcelib\\x86\\common\\ce\\retail
  95. LIB = \$(LIB);\\msdev\\wce\\lib\\x86em
  96. LIB = \$(LIB);\\Program^ Files\\DevStudio\\wce\\lib\\wce100\\x86em
  97. LIB = \$(LIB);\\msdev\\lib
  98. CFLAGS = \$(CFLAGS) -DWIN32 -D_WINDOWS -DPEGASUS
  99. CFLAGS = \$(CFLAGS) -D_X86_ -Dx86 -DUNDER_NT
  100. CPP = cl \$(CFLAGS)
  101. CL = cl \$(CFLAGS)
  102. LINKER = cl
  103. LFLAGS = \$(LFLAGS) coredll.lib user32.lib
  104. LFLAGS = -entry:_DllMainCRTStartup -ignore:4078 -align:4096 \$(LFLAGS)
  105. !ELSEIF "\$(BUILD)" == "wce_sh3_dbg"
  106. PATH = \\msdev\\wce\\bin;\$(PATH)
  107. PATH = \\Program^ Files\\DevStudio\\wce\\bin;\$(PATH)
  108. INCLUDE = ..\\wceinc
  109. LIB = ..\\wcelib\\shx\\common\\ce\\debug
  110. LIB = \$(LIB);\\msdev\\wce\\lib\\wcesh
  111. LIB = \$(LIB);\\Program^ Files\\DevStudio\\wce\\lib\\wce100\\wcesh
  112. CFLAGS = -DDEBUG -Od -Zi
  113. CFLAGS = \$(CFLAGS) -DWIN32 -D_WINDOWS -DPEGASUS
  114. CFLAGS = \$(CFLAGS) -DSHx -DUNDER_CE
  115. CPP = shcl \$(CFLAGS)
  116. CL = shcl \$(CFLAGS)
  117. LINKER = shcl
  118. LFLAGS = \$(LFLAGS) coredll.lib
  119. LFLAGS = -entry:_DllMainCRTStartup -ignore:4078 \$(LFLAGS)
  120. !ELSEIF "\$(BUILD)" == "wce_sh3_shp"
  121. PATH = \\msdev\\wce\\bin;\$(PATH)
  122. PATH = \\Program^ Files\\DevStudio\\wce\\bin;\$(PATH)
  123. INCLUDE = ..\\wceinc
  124. LIB = ..\\wcelib\\shx\\common\\ce\\retail
  125. LIB = \$(LIB);\\msdev\\wce\\lib\\wcesh
  126. LIB = \$(LIB);\\Program^ Files\\DevStudio\\wce\\lib\\wce100\\wcesh
  127. CFLAGS = -O1
  128. CFLAGS = \$(CFLAGS) -DWIN32 -D_WINDOWS -DPEGASUS
  129. CFLAGS = \$(CFLAGS) -DSHx -DUNDER_CE
  130. CPP = shcl \$(CFLAGS)
  131. CL = shcl \$(CFLAGS)
  132. LINKER = shcl
  133. LFLAGS = \$(LFLAGS) coredll.lib
  134. LFLAGS = -entry:_DllMainCRTStartup -ignore:4078 \$(LFLAGS)
  135. !ELSE
  136. !ERROR \$(BUILD) Unknown Build. Need to learn this one.
  137. !ENDIF
  138. INCLUDE = .;..\\inc;..\\lsinc;..\\tom;\$(INCLUDE);\\otools9\\inc\\win
  139. CFLAGS = \$(USERCFLAGS) \$(CFLAGS) -DUNICODE -nologo
  140. CFLAGS = \$(CFLAGS) -Zl -W4 -Ob1 -FR -GX-
  141. CFLAGS = \$(CFLAGS) -YX_common.h
  142. LFLAGS = \$(USERLFLAGS) \$(LFLAGS) /nologo
  143. LFLAGS = /implib:riched20.lib /def:riched20.def /ignore:4078 /map \$(LFLAGS) /NODEFAULTLIB:uuid.lib
  144. LFLAGS = /dll /out:\$(ODIR)\\riched20.dll /base:0x48000000 \$(LFLAGS)
  145. .c\{\$(ODIR)\}.obj:
  146. cl \$(CFLAGS) /c -Fo\$\@ \$\<
  147. .cpp\{\$(ODIR)\}.obj:
  148. cl \$(CFLAGS) /c -Fo\$\@ \$\<
  149. all: \$(ODIR)\\dxfrobj.obj \\
  150. \$(ODIR)\\tomsel.obj \\
  151. \$(ODIR)\\dispml.obj \\
  152. \$(ODIR)\\doc.obj \\
  153. \$(ODIR)\\rtflex.obj \\
  154. \$(ODIR)\\render.obj \\
  155. \$(ODIR)\\dispprt.obj \\
  156. \$(ODIR)\\measure.obj \\
  157. \$(ODIR)\\util.obj \\
  158. \$(ODIR)\\host.obj \\
  159. \$(ODIR)\\select.obj \\
  160. \$(ODIR)\\callmgr.obj \\
  161. \$(ODIR)\\dfreeze.obj \\
  162. \$(ODIR)\\rtext.obj \\
  163. \$(ODIR)\\rtfwrit.obj \\
  164. \$(ODIR)\\propchg.obj \\
  165. \$(ODIR)\\m_undo.obj \\
  166. \$(ODIR)\\rtfwrit2.obj \\
  167. \$(ODIR)\\clasifyc.obj \\
  168. \$(ODIR)\\cmsgflt.obj \\
  169. \$(ODIR)\\ime.obj \\
  170. \$(ODIR)\\magellan.obj \\
  171. \$(ODIR)\\text.obj \\
  172. \$(ODIR)\\runptr.obj \\
  173. \$(ODIR)\\disp.obj \\
  174. \$(ODIR)\\format.obj \\
  175. \$(ODIR)\\antievt.obj \\
  176. \$(ODIR)\\reinit.obj \\
  177. \$(ODIR)\\objmgr.obj \\
  178. \$(ODIR)\\ldte.obj \\
  179. \$(ODIR)\\rtfread2.obj \\
  180. \$(ODIR)\\dragdrp.obj \\
  181. \$(ODIR)\\urlsup.obj \\
  182. \$(ODIR)\\CFPF.obj \\
  183. \$(ODIR)\\uuid.obj \\
  184. \$(ODIR)\\frunptr.obj \\
  185. \$(ODIR)\\edit.obj \\
  186. \$(ODIR)\\line.obj \\
  187. \$(ODIR)\\TOMFMT.obj \\
  188. \$(ODIR)\\dispsl.obj \\
  189. \$(ODIR)\\coleobj.obj \\
  190. \$(ODIR)\\object.obj \\
  191. \$(ODIR)\\osdc.obj \\
  192. \$(ODIR)\\tomrange.obj \\
  193. \$(ODIR)\\notmgr.obj \\
  194. \$(ODIR)\\font.obj \\
  195. \$(ODIR)\\HASH.obj \\
  196. \$(ODIR)\\rtfread.obj \\
  197. \$(ODIR)\\lbhost.obj \\
  198. \$(ODIR)\\cbhost.obj \\
  199. \$(ODIR)\\devdsc.obj \\
  200. \$(ODIR)\\debug.obj \\
  201. \$(ODIR)\\range.obj \\
  202. \$(ODIR)\\array.obj \\
  203. \$(ODIR)\\TOMDOC.obj \\
  204. \$(ODIR)\\textserv.obj \\
  205. \$(ODIR)\\w32sys.obj \\
  206. \$(ODIR)\\ols.obj \\
  207. \$(ODIR)\\olsole.obj \\
  208. \$(ODIR)\\uspi.obj \\
  209. \$(ODIR)\\txtbrk.obj \\
  210. \$(ODIR)\\iaccess.obj \\
  211. \$(CHKSTK) \\
  212. \$(FTOL) \\
  213. \$(MEMMOVE) \\
  214. \$(MEMSET) \\
  215. \$(MEMCMP) \\
  216. \$(MEMCPY) \\
  217. \$(STRLEN)
  218. rc \$(RCFLAGS) richedit.rc
  219. \$(LINKER) \$(LFLAGS) \$\*\* richedit.res
  220. bscmake /oriched20.bsc /nologo \*.sbr
  221. clean:
  222. -del riched20.dll
  223. -del *.lib
  224. -del *.obj
  225. -del *.sbr
  226. -del *.pch
  227. -del *.pdb
  228. -del *.idb
  229. -del *.ilk
  230. EOT
  231. ;
  232. close (MAKEFILE);
  233. $ENV{'include'} = '.;..\inc;..\..\tom';
  234. $cppfiles = "antievt.cpp ";
  235. $cppfiles .= "array.cpp ";
  236. $cppfiles .= "callmgr.cpp ";
  237. $cppfiles .= "cfpf.cpp ";
  238. $cppfiles .= "clasifyc.cpp ";
  239. $cppfiles .= "cmsgflt.cpp ";
  240. $cppfiles .= "coleobj.cpp ";
  241. $cppfiles .= "debug.cpp ";
  242. $cppfiles .= "devdsc.cpp ";
  243. $cppfiles .= "dfreeze.cpp ";
  244. $cppfiles .= "disp.cpp ";
  245. $cppfiles .= "dispml.cpp ";
  246. $cppfiles .= "dispprt.cpp ";
  247. $cppfiles .= "dispsl.cpp ";
  248. $cppfiles .= "doc.cpp ";
  249. $cppfiles .= "dragdrp.cpp ";
  250. $cppfiles .= "dxfrobj.cpp ";
  251. $cppfiles .= "edit.cpp ";
  252. $cppfiles .= "font.cpp ";
  253. $cppfiles .= "format.cpp ";
  254. $cppfiles .= "frunptr.cpp ";
  255. $cppfiles .= "hash.cpp ";
  256. $cppfiles .= "host.cpp ";
  257. $cppfiles .= "ime.cpp ";
  258. $cppfiles .= "ldte.cpp ";
  259. $cppfiles .= "line.cpp ";
  260. $cppfiles .= "m_undo.cpp ";
  261. $cppfiles .= "magellan.cpp ";
  262. $cppfiles .= "measure.cpp ";
  263. $cppfiles .= "notmgr.cpp ";
  264. $cppfiles .= "object.cpp ";
  265. $cppfiles .= "objmgr.cpp ";
  266. $cppfiles .= "osdc.cpp ";
  267. $cppfiles .= "propchg.cpp ";
  268. $cppfiles .= "range.cpp ";
  269. $cppfiles .= "reinit.cpp ";
  270. $cppfiles .= "render.cpp ";
  271. $cppfiles .= "rtext.cpp ";
  272. $cppfiles .= "rtflex.cpp ";
  273. $cppfiles .= "rtflog.cpp ";
  274. $cppfiles .= "rtfread.cpp ";
  275. $cppfiles .= "rtfread2.cpp ";
  276. $cppfiles .= "rtfwrit.cpp ";
  277. $cppfiles .= "rtfwrit2.cpp ";
  278. $cppfiles .= "runptr.cpp ";
  279. $cppfiles .= "select.cpp ";
  280. $cppfiles .= "text.cpp ";
  281. $cppfiles .= "textserv.cpp ";
  282. $cppfiles .= "tokens.cpp ";
  283. $cppfiles .= "tomdoc.cpp ";
  284. $cppfiles .= "tomfmt.cpp ";
  285. $cppfiles .= "tomrange.cpp ";
  286. $cppfiles .= "tomsel.cpp ";
  287. $cppfiles .= "urlsup.cpp ";
  288. $cppfiles .= "util.cpp ";
  289. $cppfiles .= "uuid.cpp ";
  290. $cppfiles .= "w32sys.cpp ";
  291. $cppfiles .= "w32win32.cpp ";
  292. $cppfiles .= "w32wince.cpp ";
  293. $cppfiles .= "ols.cpp ";
  294. $cppfiles .= "olsobj.cpp ";
  295. $cppfiles .= "lbhost.cpp ";
  296. $cppfiles .= "cbhost.cpp ";
  297. $cppfiles .= "uspi.cpp ";
  298. $cppfiles .= "txtbrk.cpp ";
  299. $cppfiles .= "iaccess.cpp ";
  300. print $cppfiles;
  301. system ("mkdep -n -s .obj $cppfiles >> makefile");
  302. }