]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/makeall.bat
mingw32/cygwin compilation fixes
[wxWidgets.git] / distrib / msw / makeall.bat
CommitLineData
963a1fcd
JS
1Rem @echo off
2Rem This script compiles wxWindows and some samples/demos with
3Rem a range of compilers.
4Rem Note that it currently uses batch scripts local to Julian Smart's machine,
5Rem to set up the environment correctly.
6Rem This is a 4DOS batch file, though 4DOS dependencies have been kept to
7Rem a minimum.
8Rem Julian Smart, August 12th, 2000
9Rem TODO: making a Unicode distribution by modifying setup.h programmatically.
10Rem TODO: check differing setup.h options, again by programmatic modification
11
12set WXDIR=%WXWIN%
13set FATWXWIN=%WXDIR%
14set FULLWXWIN=%WXDIR%
15if not %@INDEX["%WXDIR%","wxWindows"] == "-1" set FATWXWIN=%@PATH[%WXDIR%]wxwind~1
16if not %@INDEX["%WXDIR%","wxWindows"] == "-1" set FULLWXWIN=%@PATH[%WXDIR%]wxWindows
17
18Rem The following line is for a specific environment -- edit, or comment out
19Rem Not working in 4NT?
20Rem if not %@INDEX["%WXDIR%","wx2stable"] == "-1" set FATWXWIN=c:\wx2sta~1\wxwind~1
21
22echo Full wxWindows path is %FULLWXWIN%, FAT path is %FATWXWIN%
23set BUILDDEST=%TEMP%\wxWinBuild
24Rem Only carry on if we haven't specified a single target
25set CARRYON=0
26
27rem goto end
28
29if "%1" == "vc6" goto dovc6
30if "%1" == "bc55" goto dobc55
31if "%1" == "bc50" goto dobc50
32if "%1" == "ming2952" goto doming2952
33if "%1" == "cygwin11" goto docygwin11
34if "%1" == "vc1" goto dovc1
35if "%1" == "bc16" goto dobc16
36
37set CARRYON=1
38
39if not direxist %BUILDDEST% mkdir /S %BUILDDEST%
40
41
42:dovc6
43
44cd %WXDIR%\samples
45erase /S *.exe
46cd %WXDIR%\demos
47erase /S *.exe
48cd %WXDIR%\contrib\samples
49erase /S *.exe
50cd %WXDIR%\utils\dialoged\src
51erase /S *.exe
52cd %WXDIR%\utils\tex2rtf\src
53erase /S *.exe
54
55echo Starting wxWindows build at %_TIME, %_DATE
56
57Rem First, VC++ 6.
58
59echo === VC++ 6 ===
60echo ==============
61
62Rem Set up the environment
63call msvc6
64
65echo *** VC++ Debug ***
66Rem VC++ Debug
67cd %WXDIR%\src\msw
68nmake -f makefile.vc cleanall
69nmake -f makefile.vc
70if not direxist %BUILDDEST%\VC6Debug mkdir /S %BUILDDEST%\VC6Debug
71erase /F /Y %BUILDDEST%\VC6Debug
72cd %WXDIR%\samples
73nmake -f makefile.vc clean
74
75Rem Make one sample, just to make sure Debug mode is OK
76cd %WXDIR%\samples\controls
77nmake -f makefile.vc
78copy controls.exe %BUILDDEST%\VC6Debug
79nmake -f makefile.vc clean
80
81cd %WXDIR%\src\msw
82nmake -f makefile.vc cleanall
83
84echo *** VC++ Release ***
85
86nmake -f makefile.vc cleanall FINAL=1
87nmake -f makefile.vc FINAL=1
88
89if not direxist %BUILDDEST%\VC6Release mkdir /S %BUILDDEST%\VC6Release
90erase /F /Y %BUILDDEST%\VC6Release
91
92cd %WXDIR%\samples
93nmake -f makefile.vc clean FINAL=1
94nmake -f makefile.vc FINAL=1
95Rem Copy all executables to VC6Release
96Rem Euch, this is the only way I can think of right now
97Rem to copy them to the same directory. Daft but...
98erase %TEMP%\temp.zip
99zip16 -r %TEMP%\temp.zip *.exe
100unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\VC6Release
101nmake -f makefile.vc clean FINAL=1
102
103cd %WXDIR%\demos
104nmake -f makefile.vc clean FINAL=1
105nmake -f makefile.vc FINAL=1
106Rem Copy all executables to VC6Release
107erase %TEMP%\temp.zip
108zip16 -r %TEMP%\temp.zip *.exe
109unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\VC6Release
110nmake -f makefile.vc clean FINAL=1
111
112Rem Compile OGL
113cd %WXDIR%\contrib\src\ogl
114nmake -f makefile.vc clean FINAL=1
115nmake -f makefile.vc FINAL=1
116cd %WXDIR%\contrib\samples\ogl\ogledit
117nmake -f makefile.vc clean FINAL=1
118nmake -f makefile.vc FINAL=1
119copy *.exe %BUILDDEST%\VC6Release
120nmake -f makefile.vc clean FINAL=1
121cd %WXDIR%\contrib\samples\ogl\studio
122nmake -f makefile.vc clean FINAL=1
123nmake -f makefile.vc FINAL=1
124copy *.exe %BUILDDEST%\VC6Release
125nmake -f makefile.vc clean FINAL=1
126cd %WXDIR%\contrib\src\ogl
127nmake -f makefile.vc clean FINAL=1
128
129Rem Compile Dialog Editor
130cd %WXDIR%\utils\dialoged\src
131nmake -f makefile.vc clean FINAL=1
132nmake -f makefile.vc FINAL=1
133copy *.exe %BUILDDEST%\VC6Release
134nmake -f makefile.vc clean FINAL=1
135
136Rem Compile Tex2RTF
137cd %WXDIR%\utils\tex2rtf\src
138nmake -f makefile.vc clean FINAL=1
139nmake -f makefile.vc FINAL=1
140copy *.exe %BUILDDEST%\VC6Release
141nmake -f makefile.vc clean FINAL=1
142
143Rem Clean up
144
145cd %WXDIR%\src\msw
146nmake -f makefile.vc cleanall FINAL=1
147
148echo *** VC++ Debug DLL ***
149
150nmake -f makefile.vc cleanall WXMAKINGDLL=1
151nmake -f makefile.vc dll pch
152
153if not direxist %BUILDDEST%\VC6DebugDLL mkdir /S %BUILDDEST%\VC6DebugDLL
154erase /F /Y %BUILDDEST%\VC6DebugDLL
155
156copy %WXDIR%\lib\*d.dll %BUILDDEST%\VC6DebugDLL
157
158Rem Make one sample, for a sanity check
159
160cd %WXDIR%\samples\controls
161nmake -f makefile.vc WXUSINGDLL=1
162copy controls.exe %BUILDDEST%\VC6DebugDLL
163nmake -f makefile.vc clean
164
165cd %WXDIR%\src\msw
166nmake -f makefile.vc cleanall WXMAKINGDLL=1
167
168echo *** VC++ Release DLL ***
169
170nmake -f makefile.vc cleanall FINAL=1 WXMAKINGDLL=1
171nmake -f makefile.vc dll pch FINAL=1
172
173if not direxist %BUILDDEST%\VC6ReleaseDLL mkdir /S %BUILDDEST%\VC6ReleaseDLL
174erase /F /Y %BUILDDEST%\VC6ReleaseDLL
175
176copy %WXDIR%\lib\*.dll %BUILDDEST%\VC6ReleaseDLL
177
178Rem Make one sample, for a sanity check
179
180cd %WXDIR%\samples\controls
181nmake -f makefile.vc WXUSINGDLL=1 FINAL=1
182copy controls.exe %BUILDDEST%\VC6ReleaseDLL
183nmake -f makefile.vc clean FINAL=1
184
185cd %WXDIR%\src\msw
186nmake -f makefile.vc cleanall WXMAKINGDLL=1 FINAL=1
187
188if "%CARRYON" == "0" goto end
189
190:dobc55
191
192echo === BC++ 5.5 ===
193echo ================
194
195call bcb55
196
197echo *** WIN32 BC++ Debug ***
198
199Rem WIN32 BC++ Debug
200cd %WXDIR%\src\msw
201make -f makefile.b32 cleanall
202make -f makefile.b32
203if not direxist %BUILDDEST%\BC55Debug mkdir /S %BUILDDEST%\BC55Debug
204erase /F /Y %BUILDDEST%\BC55Debug
205cd %WXDIR%\samples
206make -f makefile.b32 clean
207
208Rem Make one sample, just to make sure Debug mode is OK
209cd %WXDIR%\samples\controls
210make -f makefile.b32
211copy controls.exe %BUILDDEST%\BC55Debug
212make -f makefile.b32 clean
213
214Rem Compile OGL
215cd %WXDIR%\contrib\src\ogl
216make -f makefile.b32 clean
217make -f makefile.b32
218cd %WXDIR%\contrib\samples\ogl\ogledit
219make -f makefile.b32 clean
220make -f makefile.b32
221copy *.exe %BUILDDEST%\BC55Debug
222make -f makefile.b32 clean
223cd %WXDIR%\contrib\samples\ogl\studio
224make -f makefile.b32 clean
225make -f makefile.b32
226copy *.exe %BUILDDEST%\BC55Debug
227make -f makefile.b32 clean
228cd %WXDIR%\contrib\src\ogl
229make -f makefile.b32 clean
230
231cd %WXDIR%\src\msw
232make -f makefile.b32 cleanall
233
234goto bcdebugdll
235
236echo *** WIN32 BC++ Release ***
237
238make -f makefile.b32 cleanall FINAL=1
239make -f makefile.b32 FINAL=1
240
241if not direxist %BUILDDEST%\BC55Release mkdir /S %BUILDDEST%\BC55Release
242erase /F /Y %BUILDDEST%\BC55Release
243
244cd %WXDIR%\samples
245make -f makefile.b32 clean FINAL=1
246make -f makefile.b32 FINAL=1
247Rem Copy all executables to BC55Release
248erase %TEMP%\temp.zip
249zip16 -r %TEMP%\temp.zip *.exe
250unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\BC55Release
251make -f makefile.b32 clean FINAL=1
252
253cd %WXDIR%\demos
254make -f makefile.b32 clean FINAL=1
255make -f makefile.b32 FINAL=1
256Rem Copy all executables to BC55Release
257erase %TEMP%\temp.zip
258zip16 -r %TEMP%\temp.zip *.exe
259unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\BC55Release
260make -f makefile.b32 clean FINAL=1
261
262Rem Compile OGL
263cd %WXDIR%\contrib\src\ogl
264make -f makefile.b32 clean FINAL=1
265make -f makefile.b32 FINAL=1
266cd %WXDIR%\contrib\samples\ogl\ogledit
267make -f makefile.b32 clean FINAL=1
268make -f makefile.b32 FINAL=1
269copy *.exe %BUILDDEST%\BC55Release
270make -f makefile.b32 clean FINAL=1
271cd %WXDIR%\contrib\samples\ogl\studio
272make -f makefile.b32 clean FINAL=1
273make -f makefile.b32 FINAL=1
274copy *.exe %BUILDDEST%\BC55Release
275make -f makefile.b32 clean FINAL=1
276cd %WXDIR%\contrib\src\ogl
277make -f makefile.b32 clean FINAL=1
278
279Rem Compile Dialog Editor
280cd %WXDIR%\utils\dialoged\src
281make -f makefile.b32 clean FINAL=1
282make -f makefile.b32 FINAL=1
283copy *.exe %BUILDDEST%\BC55Release
284make -f makefile.b32 clean FINAL=1
285
286Rem Compile Tex2RTF
287cd %WXDIR%\utils\tex2rtf\src
288make -f makefile.b32 clean FINAL=1
289make -f makefile.b32 FINAL=1
290copy *.exe %BUILDDEST%\BC55Release
291make -f makefile.b32 clean FINAL=1
292
293Rem Clean up
294
295cd %WXDIR%\src\msw
296make -f makefile.b32 cleanall FINAL=1
297
298:bcdebugdll
299
300echo *** WIN32 BC++ Debug DLL ***
301
302make -f makefile.b32 cleanall
303make -f makefile.b32 dll
304
305if not direxist %BUILDDEST%\BC55DebugDLL mkdir /S %BUILDDEST%\BC55DebugDLL
306erase /F /Y %BUILDDEST%\BC55DebugDLL
307
308copy %WXDIR%\lib\*.dll %BUILDDEST%\BC55DebugDLL
309
310Rem Make one sample, for a sanity check
311
312cd %WXDIR%\samples\controls
313make -f makefile.b32 WXUSINGDLL=1
314copy controls.exe %BUILDDEST%\BC55DebugDLL
315make -f makefile.b32 clean
316
317cd %WXDIR%\src\msw
318make -f makefile.b32 cleanall
319
320if "%CARRYON" == "0" goto end
321
322Rem Skip BC++ 5.0, obsolete
323goto docygwin11
324:dobc50
325
326
327echo === BC++ 5.0 ===
328echo ================
329
330call borland
331
332echo *** WIN32 BC++ Debug ***
333
334Rem WIN32 BC++ Debug
335cd %WXDIR%\src\msw
336make -f makefile.b32 cleanall
337make -f makefile.b32
338if not direxist %BUILDDEST%\BC50Debug mkdir /S %BUILDDEST%\BC50Debug
339erase /F /Y %BUILDDEST%\BC50Debug
340cd %WXDIR%\samples
341make -f makefile.b32 clean
342
343Rem Make one sample, just to make sure Debug mode is OK
344cd %WXDIR%\samples\controls
345make -f makefile.b32
346copy controls.exe %BUILDDEST%\BC50Debug
347make -f makefile.b32 clean
348
349cd %WXDIR%\src\msw
350make -f makefile.b32 cleanall
351
352if "%CARRYON" == "0" goto end
353
354:docygwin11
355
356
357echo === Cygwin 1.1 ===
358echo ==================
359
360call cygwin11
361
362echo *** Cygwin Debug ***
363
364Rem Cygwin Release
365cd %WXDIR%\src\msw
366make -f makefile.g95 cleanall
367make -f makefile.g95 FINAL=1
368if not direxist %BUILDDEST%\Cygwin11Release mkdir /S %BUILDDEST%\Cygwin11Release
369erase /F /Y %BUILDDEST%\Cygwin11Release
370cd %WXDIR%\samples
371make -f makefile.g95 clean FINAL=1
372
373if not direxist %BUILDDEST%\Cygwin11Release mkdir /S %BUILDDEST%\Cygwin11Release
374erase /F /Y %BUILDDEST%\Cygwin11Release
375
376cd %WXDIR%\samples
377make -f makefile.g95 clean FINAL=1
378make -f makefile.g95 FINAL=1
379Rem Copy all executables to Cygwin11Release
380erase %TEMP%\temp.zip
381zip16 -r %TEMP%\temp.zip *.exe
382unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\Cygwin11Release
383make -f makefile.g95 clean FINAL=1
384
385cd %WXDIR%\demos
386make -f makefile.g95 clean FINAL=1
387make -f makefile.g95 FINAL=1
388Rem Copy all executables to Cygwin11Release
389erase %TEMP%\temp.zip
390zip16 -r %TEMP%\temp.zip *.exe
391unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\Cygwin11Release
392make -f makefile.g95 clean FINAL=1
393
394Rem Compile OGL
395cd %WXDIR%\contrib\src\ogl
396make -f makefile.g95 clean FINAL=1
397make -f makefile.g95 FINAL=1
398cd %WXDIR%\contrib\samples\ogl\ogledit
399make -f makefile.g95 clean FINAL=1
400make -f makefile.g95 FINAL=1
401copy *.exe %BUILDDEST%\Cygwin11Release
402make -f makefile.g95 clean FINAL=1
403cd %WXDIR%\contrib\samples\ogl\studio
404make -f makefile.g95 clean FINAL=1
405make -f makefile.g95 FINAL=1
406copy *.exe %BUILDDEST%\Cygwin11Release
407make -f makefile.g95 clean FINAL=1
408cd %WXDIR%\contrib\src\ogl
409make -f makefile.g95 clean FINAL=1
410
411Rem Compile Dialog Editor
412cd %WXDIR%\utils\dialoged\src
413make -f makefile.g95 clean FINAL=1
414make -f makefile.g95 FINAL=1
415copy *.exe %BUILDDEST%\Cygwin11Release
416make -f makefile.g95 clean FINAL=1
417
418Rem Compile Tex2RTF
419cd %WXDIR%\utils\tex2rtf\src
420make -f makefile.g95 clean FINAL=1
421make -f makefile.g95 FINAL=1
422copy *.exe %BUILDDEST%\Cygwin11Release
423make -f makefile.g95 clean FINAL=1
424
425echo Stripping executables...
426strip %BUILDDEST%\Cygwin11Release\*.exe
427
428Rem Cleanup
429
430cd %WXDIR%\src\msw
431make -f makefile.g95 cleanall
432
433if "%CARRYON" == "0" goto end
434
435:doming2952
436
437echo === Mingw32 2.95.2 ===
438echo ======================
439
440call ming2952
441
442echo *** Cygwin Debug ***
443
444Rem Cygwin Release
445cd %WXDIR%\src\msw
446make -f makefile.g95 cleanall
447make -f makefile.g95 FINAL=1
448if not direxist %BUILDDEST%\Ming2952Release mkdir /S %BUILDDEST%\Ming2952Release
449erase /F /Y %BUILDDEST%\Ming2952Release
450cd %WXDIR%\samples
451make -f makefile.g95 clean FINAL=1
452
453if not direxist %BUILDDEST%\Ming2952Release mkdir /S %BUILDDEST%\Ming2952Release
454erase /F /Y %BUILDDEST%\Ming2952Release
455
456cd %WXDIR%\samples
457make -f makefile.g95 clean FINAL=1
458make -f makefile.g95 FINAL=1
459Rem Copy all executables to Ming2952Release
460erase %TEMP%\temp.zip
461zip16 -r %TEMP%\temp.zip *.exe
462unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\Ming2952Release
463make -f makefile.g95 clean FINAL=1
464
465cd %WXDIR%\demos
466make -f makefile.g95 clean FINAL=1
467make -f makefile.g95 FINAL=1
468Rem Copy all executables to Ming2952Release
469erase %TEMP%\temp.zip
470zip16 -r %TEMP%\temp.zip *.exe
471unzip32 -o %TEMP%\temp.zip -d %BUILDDEST%\Ming2952Release
472make -f makefile.g95 clean FINAL=1
473
474Rem Compile OGL
475cd %WXDIR%\contrib\src\ogl
476make -f makefile.g95 clean FINAL=1
477make -f makefile.g95 FINAL=1
478cd %WXDIR%\contrib\samples\ogl\ogledit
479make -f makefile.g95 clean FINAL=1
480make -f makefile.g95 FINAL=1
481copy *.exe %BUILDDEST%\Ming2952Release
482make -f makefile.g95 clean FINAL=1
483cd %WXDIR%\contrib\samples\ogl\studio
484make -f makefile.g95 clean FINAL=1
485make -f makefile.g95 FINAL=1
486copy *.exe %BUILDDEST%\Ming2952Release
487make -f makefile.g95 clean FINAL=1
488cd %WXDIR%\contrib\src\ogl
489make -f makefile.g95 clean FINAL=1
490
491Rem Compile Dialog Editor
492cd %WXDIR%\utils\dialoged\src
493make -f makefile.g95 clean FINAL=1
494make -f makefile.g95 FINAL=1
495copy *.exe %BUILDDEST%\Ming2952Release
496make -f makefile.g95 clean FINAL=1
497
498Rem Compile Tex2RTF
499cd %WXDIR%\utils\tex2rtf\src
500make -f makefile.g95 clean FINAL=1
501make -f makefile.g95 FINAL=1
502copy *.exe %BUILDDEST%\Ming2952Release
503make -f makefile.g95 clean FINAL=1
504
505echo Stripping executables...
506strip %BUILDDEST%\Ming2952Release\*.exe
507
508Rem Cleanup
509
510cd %WXDIR%\src\msw
511make -f makefile.g95 cleanall
512
513if "%CARRYON" == "0" goto end
514
515:dovc1
516
517echo === 16-bit VC++ ===
518echo ===================
519
520Rem Set up the environment
521call msvc1
522
523Rem Needs full wxWindows path for making libraries
524set WXWIN=%FULLWXWIN%
525
526echo *** VC++ Debug ***
527Rem VC++ Debug
528cd %WXDIR%\src\msw
529nmake -f makefile.dos cleanall
530nmake -f makefile.dos
531if not direxist %BUILDDEST%\VC1Debug mkdir /S %BUILDDEST%\VC1Debug
532erase /F /Y %BUILDDEST%\VC1Debug
533
534Rem Make one sample, just to make sure Debug mode is OK
535cd %WXDIR%\samples\minimal
536nmake -f makefile.dos clean
537Rem Needs FAT wxWindows path for making executables
538set WXWIN=%FATWXWIN%
539nmake -f makefile.dos
540
541copy minimal.exe /S %BUILDDEST%\VC1Debug
542nmake -f makefile.dos clean
543
544cd %WXDIR%\src\msw
545nmake -f makefile.dos cleanall
546
547Rem Needs full wxWindows path for making libraries
548set WXWIN=%FULLWXWIN%
549
550echo *** VC++ Release ***
551
552nmake -f makefile.dos cleanall FINAL=1
553nmake -f makefile.dos FINAL=1
554
555if not direxist %BUILDDEST%\VC1Release mkdir /S %BUILDDEST%\VC1Release
556erase /F /Y %BUILDDEST%\VC1Release
557
558Rem Make one sample, just to make sure Release mode is OK
559cd %WXDIR%\samples\minimal
560nmake -f makefile.dos clean
561nmake -f makefile.dos FINAL=1
562Rem Needs FAT wxWindows path for making executables
563set WXWIN=%FATWXWIN%
564nmake -f makefile.dos FINAL=1
565copy minimal.exe /S %BUILDDEST%\VC1Release
566nmake -f makefile.dos clean
567set WXWIN=%tmpwxwin%
568
569Rem Clean up
570
571cd %WXDIR%\src\msw
572nmake -f makefile.dos cleanall FINAL=1
573
574if "%CARRYON" == "0" goto end
575
576:dobc16
577
578echo === 16-bit BC++ ===
579echo ===================
580
581Rem Set up the environment
582call borland
583
584echo *** 16-bit BC++ Debug ***
585Rem 16-bit BC++ Debug
586cd %WXDIR%\src\msw
587make -f makefile.bcc cleanall
588make -f makefile.bcc
589if not direxist %BUILDDEST%\BC16Debug mkdir /S %BUILDDEST%\BC16Debug
590erase /F /Y %BUILDDEST%\BC16Debug
591
592Rem Make one sample, just to make sure Debug mode is OK
593cd %WXDIR%\samples\minimal
594make -f makefile.bcc clean
595make -f makefile.bcc
596copy minimal.exe /S %BUILDDEST%\BC16Debug
597make -f makefile.bcc clean
598
599cd %WXDIR%\src\msw
600make -f makefile.bcc cleanall
601
602echo *** 16-bit BC++ Release ***
603
604make -f makefile.bcc cleanall FINAL=1
605make -f makefile.bcc FINAL=1
606
607if not direxist %BUILDDEST%\BC16Release mkdir /S %BUILDDEST%\BC16Release
608erase /F /Y %BUILDDEST%\BC16Release
609
610Rem Make one sample, just to make sure Release mode is OK
611cd %WXDIR%\samples\minimal
612make -f makefile.bcc clean
613make -f makefile.bcc FINAL=1
614copy minimal.exe /S %BUILDDEST%\BC16Release
615make -f makefile.bcc clean
616
617Rem Clean up
618
619cd %WXDIR%\src\msw
620make -f makefile.bcc cleanall FINAL=1
621
622:end
623
624echo Finished wxWindows build at %_TIME, %_DATE
625