source: snovis/trunk/obuild/DOS/build_dll_snovis.bat @ 101

Last change on this file since 101 was 101, checked in by barrand, 16 years ago
  • Property svn:executable set to *
File size: 31.6 KB
Line 
1@ECHO OFF
2SETLOCAL
3
4REM #
5REM # File produced by the obuild tool version 1.0
6REM # for the package snovis with version v1r1.
7REM #
8
9REM #////////////////////////////////////////////////
10REM # Usage :
11REM #   DOS> CD some_path\pack\version\obuild
12REM #   DOS> DOS\build_snovis
13REM #
14REM #////////////////////////////////////////////////
15
16REM #////////////////////////////////////////////////
17REM #/// Get path of this file :
18REM #////////////////////////////////////////////////
19SET obuild_snovis_path=%~dp0
20REM # Remove ending \obuild\DOS\
21SET obuild_snovis_path=%obuild_snovis_path:~0,-12%
22
23REM #////////////////////////////////////////////////
24REM #/// Treat arguments :
25REM #////////////////////////////////////////////////
26
27SET obuild_verbose=no
28SET obuild_debug=no
29SET obuild_optimize=yes
30SET obuild_set_x=no
31
32:next_arg
33IF "%1%" == "" GOTO end_args
34
35IF NOT "%1%" == "-v" GOTO end_if_v
36  SET obuild_verbose=yes
37  SHIFT
38  GOTO next_arg
39:end_if_v
40
41IF NOT "%1%" == "-g" GOTO end_if_g
42  SET obuild_debug=yes
43  SHIFT
44  GOTO next_arg
45:end_if_g
46
47IF NOT "%1%" == "-x" GOTO end_if_x
48  SET obuild_set_x=yes
49  SHIFT
50  GOTO next_arg
51:end_if_x
52
53:end_args
54
55REM #////////////////////////////////////////////////
56REM #/// End arguments.
57REM #////////////////////////////////////////////////
58
59IF %obuild_set_x% == yes ECHO ON
60
61IF %obuild_debug% == yes SET obuild_optimize=no
62
63IF "%OBUILD_PLATFORM%" == "" (
64  IF "%OS%" == "" ECHO Environment variable OS not found. & GOTO obuild_return
65  SET obuild_platform=%OS%
66) ELSE (
67  SET obuild_platform=%OBUILD_PLATFORM%
68)
69
70IF "%obuild_platform%" == "" (
71  ECHO obuild_platform variable not defined.
72  GOTO obuild_return
73)
74
75IF "%OBUILD_DIR_BIN%" == "" (
76  SET obuild_dir_bin=%obuild_platform%_obuild
77) ELSE (
78  SET obuild_dir_bin=%OBUILD_DIR_BIN%
79)
80
81IF "%obuild_dir_bin%" == "" (
82  ECHO obuild_dir_bin variable not defined.
83  GOTO obuild_return
84)
85
86IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
87
88IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
89IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_platform.exe" (
90  cl.exe /nologo /DWIN32 /MD /O2 /W3  /GX /GR /Fe"%obuild_snovis_path%\%obuild_dir_bin%\obuild_platform.exe" "%obuild_snovis_path%\obuild\cpp\obuild_platform.cpp" 1> NUL
91  IF EXIST obuild_platform.obj DEL obuild_platform.obj
92)
93
94FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
95cd "%obuild_snovis_path%\%obuild_dir_bin%"
96IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
97FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
98cd "%obuild_pwd_snovis_0%"
99SET obuild_pwd_snovis_0=
100IF NOT %obuild_platform_result% == yes GOTO end_if_platform_1
101SET bhep_home=/Users/barrand/dev/exp/nemo/bhep/v1r4p2
102:end_if_platform_1
103SET obuild_platform_result=
104FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
105cd "%obuild_snovis_path%\%obuild_dir_bin%"
106IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
107FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
108cd "%obuild_pwd_snovis_0%"
109SET obuild_pwd_snovis_0=
110IF NOT %obuild_platform_result% == yes GOTO end_if_platform_3
111SET bhep_platform=Darwin
112:end_if_platform_3
113SET obuild_platform_result=
114FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
115cd "%obuild_snovis_path%\%obuild_dir_bin%"
116IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
117FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
118cd "%obuild_pwd_snovis_0%"
119SET obuild_pwd_snovis_0=
120IF NOT %obuild_platform_result% == yes GOTO end_if_platform_5
121SET snova_home=/Users/barrand/dev/exp/nemo/snova/v2r0p0
122:end_if_platform_5
123SET obuild_platform_result=
124FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
125cd "%obuild_snovis_path%\%obuild_dir_bin%"
126IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
127FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
128cd "%obuild_pwd_snovis_0%"
129SET obuild_pwd_snovis_0=
130IF NOT %obuild_platform_result% == yes GOTO end_if_platform_7
131SET snova_platform=Darwin
132:end_if_platform_7
133SET obuild_platform_result=
134FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
135cd "%obuild_snovis_path%\%obuild_dir_bin%"
136IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
137FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
138cd "%obuild_pwd_snovis_0%"
139SET obuild_pwd_snovis_0=
140IF NOT %obuild_platform_result% == yes GOTO end_if_platform_9
141SET CLHEP_home=/usr/local/CLHEP/2.0.3.1
142:end_if_platform_9
143SET obuild_platform_result=
144FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
145cd "%obuild_snovis_path%\%obuild_dir_bin%"
146IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
147FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
148cd "%obuild_pwd_snovis_0%"
149SET obuild_pwd_snovis_0=
150IF NOT %obuild_platform_result% == yes GOTO end_if_platform_11
151SET Geant4_home=/usr/local/geant4/8.2
152:end_if_platform_11
153SET obuild_platform_result=
154FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
155cd "%obuild_snovis_path%\%obuild_dir_bin%"
156IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
157FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
158cd "%obuild_pwd_snovis_0%"
159SET obuild_pwd_snovis_0=
160IF NOT %obuild_platform_result% == yes GOTO end_if_platform_12
161SET obuild_cxx_command=c++
162:end_if_platform_12
163SET obuild_platform_result=
164FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
165cd "%obuild_snovis_path%\%obuild_dir_bin%"
166IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
167FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
168cd "%obuild_pwd_snovis_0%"
169SET obuild_pwd_snovis_0=
170IF NOT %obuild_platform_result% == yes GOTO end_if_platform_13
171SET obuild_cxx_command=c++
172:end_if_platform_13
173SET obuild_platform_result=
174FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
175cd "%obuild_snovis_path%\%obuild_dir_bin%"
176IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
177FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
178cd "%obuild_pwd_snovis_0%"
179SET obuild_pwd_snovis_0=
180IF NOT %obuild_platform_result% == yes GOTO end_if_platform_14
181SET obuild_cxx_command=cxx
182:end_if_platform_14
183SET obuild_platform_result=
184FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
185cd "%obuild_snovis_path%\%obuild_dir_bin%"
186IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
187FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
188cd "%obuild_pwd_snovis_0%"
189SET obuild_pwd_snovis_0=
190IF NOT %obuild_platform_result% == yes GOTO end_if_platform_15
191SET obuild_cxx_command=cl.exe
192:end_if_platform_15
193SET obuild_platform_result=
194IF "%obuild_cxx_command%" == ""  ECHO Variable obuild_cxx_command not defined.  && GOTO obuild_return
195
196FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
197cd "%obuild_snovis_path%\%obuild_dir_bin%"
198IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
199FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
200cd "%obuild_pwd_snovis_0%"
201SET obuild_pwd_snovis_0=
202IF NOT %obuild_platform_result% == yes GOTO end_if_platform_16
203SET obuild_cxx_optimize=-O
204:end_if_platform_16
205SET obuild_platform_result=
206FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
207cd "%obuild_snovis_path%\%obuild_dir_bin%"
208IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
209FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
210cd "%obuild_pwd_snovis_0%"
211SET obuild_pwd_snovis_0=
212IF NOT %obuild_platform_result% == yes GOTO end_if_platform_17
213SET obuild_cxx_optimize=-O
214:end_if_platform_17
215SET obuild_platform_result=
216FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
217cd "%obuild_snovis_path%\%obuild_dir_bin%"
218IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
219FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
220cd "%obuild_pwd_snovis_0%"
221SET obuild_pwd_snovis_0=
222IF NOT %obuild_platform_result% == yes GOTO end_if_platform_18
223SET obuild_cxx_optimize=-O
224:end_if_platform_18
225SET obuild_platform_result=
226FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
227cd "%obuild_snovis_path%\%obuild_dir_bin%"
228IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
229FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
230cd "%obuild_pwd_snovis_0%"
231SET obuild_pwd_snovis_0=
232IF NOT %obuild_platform_result% == yes GOTO end_if_platform_19
233SET obuild_cxx_optimize=/O2
234:end_if_platform_19
235SET obuild_platform_result=
236
237FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
238cd "%obuild_snovis_path%\%obuild_dir_bin%"
239IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
240FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
241cd "%obuild_pwd_snovis_0%"
242SET obuild_pwd_snovis_0=
243IF NOT %obuild_platform_result% == yes GOTO end_if_platform_20
244SET obuild_cxx_debug=-g
245:end_if_platform_20
246SET obuild_platform_result=
247FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
248cd "%obuild_snovis_path%\%obuild_dir_bin%"
249IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
250FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
251cd "%obuild_pwd_snovis_0%"
252SET obuild_pwd_snovis_0=
253IF NOT %obuild_platform_result% == yes GOTO end_if_platform_21
254SET obuild_cxx_debug=-g
255:end_if_platform_21
256SET obuild_platform_result=
257FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
258cd "%obuild_snovis_path%\%obuild_dir_bin%"
259IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
260FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
261cd "%obuild_pwd_snovis_0%"
262SET obuild_pwd_snovis_0=
263IF NOT %obuild_platform_result% == yes GOTO end_if_platform_22
264SET obuild_cxx_debug=-g
265:end_if_platform_22
266SET obuild_platform_result=
267FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
268cd "%obuild_snovis_path%\%obuild_dir_bin%"
269IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
270FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
271cd "%obuild_pwd_snovis_0%"
272SET obuild_pwd_snovis_0=
273IF NOT %obuild_platform_result% == yes GOTO end_if_platform_23
274SET obuild_cxx_debug=/ZI /Od
275:end_if_platform_23
276SET obuild_platform_result=
277
278FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
279cd "%obuild_snovis_path%\%obuild_dir_bin%"
280IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
281FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
282cd "%obuild_pwd_snovis_0%"
283SET obuild_pwd_snovis_0=
284IF NOT %obuild_platform_result% == yes GOTO end_if_platform_24
285SET obuild_cxx_options=-fPIC
286:end_if_platform_24
287SET obuild_platform_result=
288FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
289cd "%obuild_snovis_path%\%obuild_dir_bin%"
290IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
291FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
292cd "%obuild_pwd_snovis_0%"
293SET obuild_pwd_snovis_0=
294IF NOT %obuild_platform_result% == yes GOTO end_if_platform_25
295SET obuild_cxx_options=/nologo /DWIN32 /MD /GX /GR /W3
296:end_if_platform_25
297SET obuild_platform_result=
298
299IF NOT %obuild_debug% == yes GOTO else_if_db_build_dll_snovis_sh_26
300  SET obuild_cxx_debug_local=%obuild_cxx_debug%
301  GOTO end_if_db_build_dll_snovis_sh_26
302:else_if_db_build_dll_snovis_sh_26
303  SET obuild_cxx_debug_local=
304:end_if_db_build_dll_snovis_sh_26
305
306IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_dll_snovis_sh_27
307  SET obuild_cxx_optimize_local=%obuild_cxx_optimize%
308  GOTO end_if_opt_build_dll_snovis_sh_27
309:else_if_opt_build_dll_snovis_sh_27
310  SET obuild_cxx_optimize_local=
311:end_if_opt_build_dll_snovis_sh_27
312
313
314IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
315IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" (
316  cl.exe /nologo /DWIN32 /MD /O2 /W3 /GX /GR /Fe"%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" "%obuild_snovis_path%\obuild\cpp\obuild_find.cpp" 1> NUL
317  IF EXIST obuild_find.obj DEL obuild_find.obj
318)
319FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
320cd "%obuild_snovis_path%\%obuild_dir_bin%"
321IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
322FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  Lib v8r*`) DO SET obuild_Lib_path=%%j
323cd "%obuild_pwd_snovis_0%"
324SET obuild_pwd_snovis_0=
325IF NOT DEFINED obuild_Lib_path  ECHO Can't find Lib package.  && GOTO obuild_return
326FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
327cd "%obuild_snovis_path%\%obuild_dir_bin%"
328IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
329FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  Slash v1r*`) DO SET obuild_Slash_path=%%j
330cd "%obuild_pwd_snovis_0%"
331SET obuild_pwd_snovis_0=
332IF NOT DEFINED obuild_Slash_path  ECHO Can't find Slash package.  && GOTO obuild_return
333FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
334cd "%obuild_snovis_path%\%obuild_dir_bin%"
335IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
336FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  AIDA v3r2p1`) DO SET obuild_AIDA_path=%%j
337cd "%obuild_pwd_snovis_0%"
338SET obuild_pwd_snovis_0=
339IF NOT DEFINED obuild_AIDA_path  ECHO Can't find AIDA package.  && GOTO obuild_return
340FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
341cd "%obuild_snovis_path%\%obuild_dir_bin%"
342IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
343FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  OnX v17r*`) DO SET obuild_OnX_path=%%j
344cd "%obuild_pwd_snovis_0%"
345SET obuild_pwd_snovis_0=
346IF NOT DEFINED obuild_OnX_path  ECHO Can't find OnX package.  && GOTO obuild_return
347FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
348cd "%obuild_snovis_path%\%obuild_dir_bin%"
349IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
350FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  G4Lab v8r*`) DO SET obuild_G4Lab_path=%%j
351cd "%obuild_pwd_snovis_0%"
352SET obuild_pwd_snovis_0=
353IF NOT DEFINED obuild_G4Lab_path  ECHO Can't find G4Lab package.  && GOTO obuild_return
354FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
355cd "%obuild_snovis_path%\%obuild_dir_bin%"
356IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
357FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  BatchLab v1r*`) DO SET obuild_BatchLab_path=%%j
358cd "%obuild_pwd_snovis_0%"
359SET obuild_pwd_snovis_0=
360IF NOT DEFINED obuild_BatchLab_path  ECHO Can't find BatchLab package.  && GOTO obuild_return
361FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
362cd "%obuild_snovis_path%\%obuild_dir_bin%"
363IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
364FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HEPVis v6r*`) DO SET obuild_HEPVis_path=%%j
365cd "%obuild_pwd_snovis_0%"
366SET obuild_pwd_snovis_0=
367IF NOT DEFINED obuild_HEPVis_path  ECHO Can't find HEPVis package.  && GOTO obuild_return
368FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
369cd "%obuild_snovis_path%\%obuild_dir_bin%"
370IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
371FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  CoinGL v1r*`) DO SET obuild_CoinGL_path=%%j
372cd "%obuild_pwd_snovis_0%"
373SET obuild_pwd_snovis_0=
374IF NOT DEFINED obuild_CoinGL_path  ECHO Can't find CoinGL package.  && GOTO obuild_return
375FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
376cd "%obuild_snovis_path%\%obuild_dir_bin%"
377IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
378FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  Lib v8r*`) DO SET obuild_Lib_path=%%j
379cd "%obuild_pwd_snovis_0%"
380SET obuild_pwd_snovis_0=
381IF NOT DEFINED obuild_Lib_path  ECHO Can't find Lib package.  && GOTO obuild_return
382FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
383cd "%obuild_snovis_path%\%obuild_dir_bin%"
384IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
385FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  expat v1r*`) DO SET obuild_expat_path=%%j
386cd "%obuild_pwd_snovis_0%"
387SET obuild_pwd_snovis_0=
388IF NOT DEFINED obuild_expat_path  ECHO Can't find expat package.  && GOTO obuild_return
389FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
390cd "%obuild_snovis_path%\%obuild_dir_bin%"
391IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
392FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  Lib v8r*`) DO SET obuild_Lib_path=%%j
393cd "%obuild_pwd_snovis_0%"
394SET obuild_pwd_snovis_0=
395IF NOT DEFINED obuild_Lib_path  ECHO Can't find Lib package.  && GOTO obuild_return
396FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
397cd "%obuild_snovis_path%\%obuild_dir_bin%"
398IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
399FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  zlib v1r*`) DO SET obuild_zlib_path=%%j
400cd "%obuild_pwd_snovis_0%"
401SET obuild_pwd_snovis_0=
402IF NOT DEFINED obuild_zlib_path  ECHO Can't find zlib package.  && GOTO obuild_return
403FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
404cd "%obuild_snovis_path%\%obuild_dir_bin%"
405IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
406FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  Lib v8r*`) DO SET obuild_Lib_path=%%j
407cd "%obuild_pwd_snovis_0%"
408SET obuild_pwd_snovis_0=
409IF NOT DEFINED obuild_Lib_path  ECHO Can't find Lib package.  && GOTO obuild_return
410FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
411cd "%obuild_snovis_path%\%obuild_dir_bin%"
412IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
413FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HEPVis v6r*`) DO SET obuild_HEPVis_path=%%j
414cd "%obuild_pwd_snovis_0%"
415SET obuild_pwd_snovis_0=
416IF NOT DEFINED obuild_HEPVis_path  ECHO Can't find HEPVis package.  && GOTO obuild_return
417FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
418cd "%obuild_snovis_path%\%obuild_dir_bin%"
419IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
420FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HEPVis v6r*`) DO SET obuild_HEPVis_path=%%j
421cd "%obuild_pwd_snovis_0%"
422SET obuild_pwd_snovis_0=
423IF NOT DEFINED obuild_HEPVis_path  ECHO Can't find HEPVis package.  && GOTO obuild_return
424FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
425cd "%obuild_snovis_path%\%obuild_dir_bin%"
426IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
427FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  jpeg v1r*`) DO SET obuild_jpeg_path=%%j
428cd "%obuild_pwd_snovis_0%"
429SET obuild_pwd_snovis_0=
430IF NOT DEFINED obuild_jpeg_path  ECHO Can't find jpeg package.  && GOTO obuild_return
431FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
432cd "%obuild_snovis_path%\%obuild_dir_bin%"
433IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
434FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  dvi2bitmap v1r*`) DO SET obuild_dvi2bitmap_path=%%j
435cd "%obuild_pwd_snovis_0%"
436SET obuild_pwd_snovis_0=
437IF NOT DEFINED obuild_dvi2bitmap_path  ECHO Can't find dvi2bitmap package.  && GOTO obuild_return
438FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
439cd "%obuild_snovis_path%\%obuild_dir_bin%"
440IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
441FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  freetype2 v1r*`) DO SET obuild_freetype2_path=%%j
442cd "%obuild_pwd_snovis_0%"
443SET obuild_pwd_snovis_0=
444IF NOT DEFINED obuild_freetype2_path  ECHO Can't find freetype2 package.  && GOTO obuild_return
445FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
446cd "%obuild_snovis_path%\%obuild_dir_bin%"
447IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
448FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  CoinGL v1r*`) DO SET obuild_CoinGL_path=%%j
449cd "%obuild_pwd_snovis_0%"
450SET obuild_pwd_snovis_0=
451IF NOT DEFINED obuild_CoinGL_path  ECHO Can't find CoinGL package.  && GOTO obuild_return
452
453SET obuild_cxx_includes=/I"%obuild_snovis_path%"
454SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_Lib_path%\include"
455SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_Slash_path%"
456SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_AIDA_path%\src\cpp"
457SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_OnX_path%\include"
458SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_G4Lab_path%\include"
459SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_BatchLab_path%"
460SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_HEPVis_path%\include"
461SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_CoinGL_path%\include"
462FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
463cd "%obuild_snovis_path%\%obuild_dir_bin%"
464IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
465FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
466cd "%obuild_pwd_snovis_0%"
467SET obuild_pwd_snovis_0=
468IF NOT %obuild_platform_result% == yes GOTO end_if_platform_37
469SET obuild_cxx_includes=%obuild_cxx_includes% -I/System/Library/Frameworks/OpenGL.framework/Headers
470:end_if_platform_37
471SET obuild_platform_result=
472FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
473cd "%obuild_snovis_path%\%obuild_dir_bin%"
474IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
475FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
476cd "%obuild_pwd_snovis_0%"
477SET obuild_pwd_snovis_0=
478IF NOT %obuild_platform_result% == yes GOTO end_if_platform_38
479SET obuild_cxx_includes=%obuild_cxx_includes% -I${OBUILD_OPENGL_HOME}/include
480:end_if_platform_38
481SET obuild_platform_result=
482
483IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\dll_snovis" RMDIR /S /Q "%obuild_snovis_path%\%obuild_dir_bin%\dll_snovis"
484IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\dll_snovis" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%\dll_snovis"
485
486@IF %obuild_verbose% == yes @ECHO ON
487cd "%obuild_snovis_path%\%obuild_dir_bin%"
488%obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\dll_snovis\Callbacks.obj  /Tp"..\source\Callbacks.cxx" 1> cl_exe_error
489@IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
490@IF NOT ERRORLEVEL 1 @DEL cl_exe_error
491cd "%obuild_snovis_path%\obuild"
492
493cd "%obuild_snovis_path%\%obuild_dir_bin%"
494%obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\dll_snovis\InventorCallbacks.obj  /Tp"..\source\InventorCallbacks.cxx" 1> cl_exe_error
495@IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
496@IF NOT ERRORLEVEL 1 @DEL cl_exe_error
497cd "%obuild_snovis_path%\obuild"
498
499cd "%obuild_snovis_path%\%obuild_dir_bin%"
500%obuild_cxx_command% /c %obuild_cxx_debug_local% %obuild_cxx_optimize_local% %obuild_cxx_options% %obuild_cxx_macros% %obuild_cxx_includes% /Fo.\dll_snovis\Layouts.obj  /Tp"..\source\Layouts.cxx" 1> cl_exe_error
501@IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
502@IF NOT ERRORLEVEL 1 @DEL cl_exe_error
503cd "%obuild_snovis_path%\obuild"
504
505@IF %obuild_verbose% == yes @ECHO OFF
506
507SET obuild_linked_libraries="%obuild_Lib_path%\%obuild_dir_bin%\LibXML.lib"
508SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_expat_path%\%obuild_dir_bin%\osc_expat.lib"
509SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_Lib_path%\%obuild_dir_bin%\LibZip.lib"
510SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_zlib_path%\%obuild_dir_bin%\osc_z.lib"
511SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_Lib_path%\%obuild_dir_bin%\LibUtils.lib"
512SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_HEPVis_path%\%obuild_dir_bin%\HEPVisGeometry.lib"
513SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_HEPVis_path%\%obuild_dir_bin%\HEPVisUtils.lib"
514SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_jpeg_path%\%obuild_dir_bin%\osc_jpeg.lib"
515SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_dvi2bitmap_path%\%obuild_dir_bin%\osc_dvi2bitmap.lib"
516SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_freetype2_path%\%obuild_dir_bin%\osc_freetype2.lib"
517SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_CoinGL_path%\%obuild_dir_bin%\osc_Coin.lib"
518FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
519cd "%obuild_snovis_path%\%obuild_dir_bin%"
520IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
521FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
522cd "%obuild_pwd_snovis_0%"
523SET obuild_pwd_snovis_0=
524IF NOT %obuild_platform_result% == yes GOTO end_if_platform_53
525SET obuild_linked_libraries=%obuild_linked_libraries% -framework OpenGL -framework AGL
526:end_if_platform_53
527SET obuild_platform_result=
528FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
529cd "%obuild_snovis_path%\%obuild_dir_bin%"
530IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
531FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
532cd "%obuild_pwd_snovis_0%"
533SET obuild_pwd_snovis_0=
534IF NOT %obuild_platform_result% == yes GOTO end_if_platform_54
535SET obuild_linked_libraries=%obuild_linked_libraries% -framework ApplicationServices
536:end_if_platform_54
537SET obuild_platform_result=
538FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
539cd "%obuild_snovis_path%\%obuild_dir_bin%"
540IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
541FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
542cd "%obuild_pwd_snovis_0%"
543SET obuild_pwd_snovis_0=
544IF NOT %obuild_platform_result% == yes GOTO end_if_platform_55
545SET obuild_linked_libraries=%obuild_linked_libraries% -L/usr/lib -lGLU -lGL -lm
546:end_if_platform_55
547SET obuild_platform_result=
548FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
549cd "%obuild_snovis_path%\%obuild_dir_bin%"
550IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
551FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
552cd "%obuild_pwd_snovis_0%"
553SET obuild_pwd_snovis_0=
554IF NOT %obuild_platform_result% == yes GOTO end_if_platform_56
555SET obuild_linked_libraries=%obuild_linked_libraries% glu32.lib opengl32.lib gdi32.lib user32.lib
556:end_if_platform_56
557SET obuild_platform_result=
558FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
559cd "%obuild_snovis_path%\%obuild_dir_bin%"
560IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
561FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
562cd "%obuild_pwd_snovis_0%"
563SET obuild_pwd_snovis_0=
564IF NOT %obuild_platform_result% == yes GOTO end_if_platform_57
565SET obuild_linked_libraries=%obuild_linked_libraries% -L${OBUILD_OPENGL_HOME}/lib -lGLU -lGL -lm
566:end_if_platform_57
567SET obuild_platform_result=
568FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
569cd "%obuild_snovis_path%\%obuild_dir_bin%"
570IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
571FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% UNIX`) DO SET obuild_platform_result=%%j
572cd "%obuild_pwd_snovis_0%"
573SET obuild_pwd_snovis_0=
574IF NOT %obuild_platform_result% == yes GOTO end_if_platform_58
575SET obuild_linked_libraries=%obuild_linked_libraries% -lpthread
576:end_if_platform_58
577SET obuild_platform_result=
578
579FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
580cd "%obuild_snovis_path%\%obuild_dir_bin%"
581IF EXIST .\dll_snovis\tmp_objs DEL .\dll_snovis\tmp_objs
582FOR %%f IN (.\dll_snovis\*.obj) DO ECHO %%f >> .\dll_snovis\tmp_objs
583
584REM # Create the archive library snovis :
585@IF %obuild_verbose% == yes @ECHO ON
586lib.exe /nologo /machine:ix86 /out:.\dll_snovis\snovis.arc @.\dll_snovis\tmp_objs
587@IF ERRORLEVEL 1 @GOTO obuild_return
588@IF %obuild_verbose% == yes @ECHO OFF
589
590REM # Build the obuild_windef.exe utility program :
591cl.exe /nologo /DWIN32 /MD /O2 /W3 /Feobuild_windef.exe "%obuild_snovis_path%\obuild\cpp\obuild_windef.c" 1> NUL
592IF EXIST obuild_windef.obj DEL obuild_windef.obj
593
594REM # Building the .def file :
595@IF %obuild_verbose% == yes @ECHO ON
596dumpbin.exe /symbols /out:.\dll_snovis\tmp .\dll_snovis\snovis.arc 1> dumpbin_exe_error .\dll_snovis\snovis.arc
597@IF ERRORLEVEL 1 @TYPE dumpbin_exe_error && @GOTO obuild_return
598@IF NOT ERRORLEVEL 1 @DEL dumpbin_exe_error
599@IF %obuild_verbose% == yes @ECHO OFF
600.\obuild_windef.exe snovis < .\dll_snovis\tmp > .\dll_snovis\snovis.def
601REM # Building the linking library :
602REM # It produces a .exp file.
603@IF %obuild_verbose% == yes @ECHO ON
604lib.exe /nologo /machine:ix86 /out:.\dll_snovis\snovis.lib /def:.\dll_snovis\snovis.def 1> lib_exe_error
605@IF ERRORLEVEL 1 @TYPE lib_exe_error && @GOTO obuild_return
606@IF NOT ERRORLEVEL 1 @DEL lib_exe_error
607@IF %obuild_verbose% == yes @ECHO OFF
608
609REM # Building the DLL :
610IF EXIST .\snovis.dll DEL .\snovis.dll
611@IF %obuild_verbose% == yes @ECHO ON
612link.exe /nologo /dll /out:.\snovis.dll .\dll_snovis\snovis.exp .\dll_snovis\snovis.arc %obuild_linked_libraries%
613@IF %obuild_verbose% == yes @ECHO OFF
614
615cd "%obuild_pwd_snovis_0%"
616SET obuild_pwd_snovis_0=
617REM # Some cleanup :
618IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\dll_snovis\tmp_objs" DEL "%obuild_snovis_path%\%obuild_dir_bin%\dll_snovis\tmp_objs"
619IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\snovis.exp" DEL "%obuild_snovis_path%\%obuild_dir_bin%\snovis.exp"
620
621:obuild_return
622ENDLOCAL
623@ECHO ON
Note: See TracBrowser for help on using the repository browser.