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

Last change on this file since 137 was 137, checked in by barrand, 17 years ago
  • Property svn:executable set to *
File size: 29.5 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 CLHEP_home=/usr/local/CLHEP/2.0.3.1
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% UNIX`) 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 Geant4_home=/usr/local/geant4/8.2
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% Darwin`) 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_4
121SET obuild_cxx_command=c++
122:end_if_platform_4
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% Linux`) 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_5
131SET obuild_cxx_command=c++
132:end_if_platform_5
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% OSF1`) 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_6
141SET obuild_cxx_command=cxx
142:end_if_platform_6
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% Windows_NT`) 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_7
151SET obuild_cxx_command=cl.exe
152:end_if_platform_7
153SET obuild_platform_result=
154IF "%obuild_cxx_command%" == ""  ECHO Variable obuild_cxx_command not defined.  && GOTO obuild_return
155
156FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
157cd "%obuild_snovis_path%\%obuild_dir_bin%"
158IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
159FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
160cd "%obuild_pwd_snovis_0%"
161SET obuild_pwd_snovis_0=
162IF NOT %obuild_platform_result% == yes GOTO end_if_platform_8
163SET obuild_cxx_optimize=-O
164:end_if_platform_8
165SET obuild_platform_result=
166FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
167cd "%obuild_snovis_path%\%obuild_dir_bin%"
168IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
169FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
170cd "%obuild_pwd_snovis_0%"
171SET obuild_pwd_snovis_0=
172IF NOT %obuild_platform_result% == yes GOTO end_if_platform_9
173SET obuild_cxx_optimize=-O
174:end_if_platform_9
175SET obuild_platform_result=
176FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
177cd "%obuild_snovis_path%\%obuild_dir_bin%"
178IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
179FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
180cd "%obuild_pwd_snovis_0%"
181SET obuild_pwd_snovis_0=
182IF NOT %obuild_platform_result% == yes GOTO end_if_platform_10
183SET obuild_cxx_optimize=-O
184:end_if_platform_10
185SET obuild_platform_result=
186FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
187cd "%obuild_snovis_path%\%obuild_dir_bin%"
188IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
189FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
190cd "%obuild_pwd_snovis_0%"
191SET obuild_pwd_snovis_0=
192IF NOT %obuild_platform_result% == yes GOTO end_if_platform_11
193SET obuild_cxx_optimize=/O2
194:end_if_platform_11
195SET obuild_platform_result=
196
197FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
198cd "%obuild_snovis_path%\%obuild_dir_bin%"
199IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
200FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
201cd "%obuild_pwd_snovis_0%"
202SET obuild_pwd_snovis_0=
203IF NOT %obuild_platform_result% == yes GOTO end_if_platform_12
204SET obuild_cxx_debug=-g
205:end_if_platform_12
206SET obuild_platform_result=
207FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
208cd "%obuild_snovis_path%\%obuild_dir_bin%"
209IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
210FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
211cd "%obuild_pwd_snovis_0%"
212SET obuild_pwd_snovis_0=
213IF NOT %obuild_platform_result% == yes GOTO end_if_platform_13
214SET obuild_cxx_debug=-g
215:end_if_platform_13
216SET obuild_platform_result=
217FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
218cd "%obuild_snovis_path%\%obuild_dir_bin%"
219IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
220FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
221cd "%obuild_pwd_snovis_0%"
222SET obuild_pwd_snovis_0=
223IF NOT %obuild_platform_result% == yes GOTO end_if_platform_14
224SET obuild_cxx_debug=-g
225:end_if_platform_14
226SET obuild_platform_result=
227FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
228cd "%obuild_snovis_path%\%obuild_dir_bin%"
229IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
230FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
231cd "%obuild_pwd_snovis_0%"
232SET obuild_pwd_snovis_0=
233IF NOT %obuild_platform_result% == yes GOTO end_if_platform_15
234SET obuild_cxx_debug=/ZI /Od
235:end_if_platform_15
236SET obuild_platform_result=
237
238FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
239cd "%obuild_snovis_path%\%obuild_dir_bin%"
240IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
241FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
242cd "%obuild_pwd_snovis_0%"
243SET obuild_pwd_snovis_0=
244IF NOT %obuild_platform_result% == yes GOTO end_if_platform_16
245SET obuild_cxx_options=-fPIC
246:end_if_platform_16
247SET obuild_platform_result=
248FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
249cd "%obuild_snovis_path%\%obuild_dir_bin%"
250IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
251FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
252cd "%obuild_pwd_snovis_0%"
253SET obuild_pwd_snovis_0=
254IF NOT %obuild_platform_result% == yes GOTO end_if_platform_17
255SET obuild_cxx_options=/nologo /DWIN32 /MD /GX /GR /W3
256:end_if_platform_17
257SET obuild_platform_result=
258
259IF NOT %obuild_debug% == yes GOTO else_if_db_build_dll_snovis_sh_18
260  SET obuild_cxx_debug_local=%obuild_cxx_debug%
261  GOTO end_if_db_build_dll_snovis_sh_18
262:else_if_db_build_dll_snovis_sh_18
263  SET obuild_cxx_debug_local=
264:end_if_db_build_dll_snovis_sh_18
265
266IF NOT %obuild_optimize% == yes GOTO else_if_opt_build_dll_snovis_sh_19
267  SET obuild_cxx_optimize_local=%obuild_cxx_optimize%
268  GOTO end_if_opt_build_dll_snovis_sh_19
269:else_if_opt_build_dll_snovis_sh_19
270  SET obuild_cxx_optimize_local=
271:end_if_opt_build_dll_snovis_sh_19
272
273
274IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%"
275IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\obuild_find.exe" (
276  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
277  IF EXIST obuild_find.obj DEL obuild_find.obj
278)
279FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
280cd "%obuild_snovis_path%\%obuild_dir_bin%"
281IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
282FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  Lib v8r*`) DO SET obuild_Lib_path=%%j
283cd "%obuild_pwd_snovis_0%"
284SET obuild_pwd_snovis_0=
285IF NOT DEFINED obuild_Lib_path  ECHO Can't find Lib package.  && GOTO obuild_return
286FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
287cd "%obuild_snovis_path%\%obuild_dir_bin%"
288IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
289FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  Slash v1r*`) DO SET obuild_Slash_path=%%j
290cd "%obuild_pwd_snovis_0%"
291SET obuild_pwd_snovis_0=
292IF NOT DEFINED obuild_Slash_path  ECHO Can't find Slash package.  && GOTO obuild_return
293FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
294cd "%obuild_snovis_path%\%obuild_dir_bin%"
295IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
296FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  AIDA v3r2p1`) DO SET obuild_AIDA_path=%%j
297cd "%obuild_pwd_snovis_0%"
298SET obuild_pwd_snovis_0=
299IF NOT DEFINED obuild_AIDA_path  ECHO Can't find AIDA package.  && GOTO obuild_return
300FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
301cd "%obuild_snovis_path%\%obuild_dir_bin%"
302IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
303FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  OnX v17r*`) DO SET obuild_OnX_path=%%j
304cd "%obuild_pwd_snovis_0%"
305SET obuild_pwd_snovis_0=
306IF NOT DEFINED obuild_OnX_path  ECHO Can't find OnX package.  && GOTO obuild_return
307FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
308cd "%obuild_snovis_path%\%obuild_dir_bin%"
309IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
310FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  G4Lab v8r*`) DO SET obuild_G4Lab_path=%%j
311cd "%obuild_pwd_snovis_0%"
312SET obuild_pwd_snovis_0=
313IF NOT DEFINED obuild_G4Lab_path  ECHO Can't find G4Lab package.  && GOTO obuild_return
314FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
315cd "%obuild_snovis_path%\%obuild_dir_bin%"
316IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
317FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  BatchLab v1r*`) DO SET obuild_BatchLab_path=%%j
318cd "%obuild_pwd_snovis_0%"
319SET obuild_pwd_snovis_0=
320IF NOT DEFINED obuild_BatchLab_path  ECHO Can't find BatchLab package.  && GOTO obuild_return
321FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
322cd "%obuild_snovis_path%\%obuild_dir_bin%"
323IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
324FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HEPVis v6r*`) DO SET obuild_HEPVis_path=%%j
325cd "%obuild_pwd_snovis_0%"
326SET obuild_pwd_snovis_0=
327IF NOT DEFINED obuild_HEPVis_path  ECHO Can't find HEPVis package.  && GOTO obuild_return
328FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
329cd "%obuild_snovis_path%\%obuild_dir_bin%"
330IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
331FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  CoinGL v1r*`) DO SET obuild_CoinGL_path=%%j
332cd "%obuild_pwd_snovis_0%"
333SET obuild_pwd_snovis_0=
334IF NOT DEFINED obuild_CoinGL_path  ECHO Can't find CoinGL package.  && GOTO obuild_return
335FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
336cd "%obuild_snovis_path%\%obuild_dir_bin%"
337IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
338FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  Lib v8r*`) DO SET obuild_Lib_path=%%j
339cd "%obuild_pwd_snovis_0%"
340SET obuild_pwd_snovis_0=
341IF NOT DEFINED obuild_Lib_path  ECHO Can't find Lib package.  && GOTO obuild_return
342FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
343cd "%obuild_snovis_path%\%obuild_dir_bin%"
344IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
345FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  expat v1r*`) DO SET obuild_expat_path=%%j
346cd "%obuild_pwd_snovis_0%"
347SET obuild_pwd_snovis_0=
348IF NOT DEFINED obuild_expat_path  ECHO Can't find expat package.  && GOTO obuild_return
349FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
350cd "%obuild_snovis_path%\%obuild_dir_bin%"
351IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
352FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  Lib v8r*`) DO SET obuild_Lib_path=%%j
353cd "%obuild_pwd_snovis_0%"
354SET obuild_pwd_snovis_0=
355IF NOT DEFINED obuild_Lib_path  ECHO Can't find Lib package.  && GOTO obuild_return
356FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
357cd "%obuild_snovis_path%\%obuild_dir_bin%"
358IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
359FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  zlib v1r*`) DO SET obuild_zlib_path=%%j
360cd "%obuild_pwd_snovis_0%"
361SET obuild_pwd_snovis_0=
362IF NOT DEFINED obuild_zlib_path  ECHO Can't find zlib package.  && GOTO obuild_return
363FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
364cd "%obuild_snovis_path%\%obuild_dir_bin%"
365IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
366FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  Lib v8r*`) DO SET obuild_Lib_path=%%j
367cd "%obuild_pwd_snovis_0%"
368SET obuild_pwd_snovis_0=
369IF NOT DEFINED obuild_Lib_path  ECHO Can't find Lib package.  && GOTO obuild_return
370FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
371cd "%obuild_snovis_path%\%obuild_dir_bin%"
372IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
373FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HEPVis v6r*`) DO SET obuild_HEPVis_path=%%j
374cd "%obuild_pwd_snovis_0%"
375SET obuild_pwd_snovis_0=
376IF NOT DEFINED obuild_HEPVis_path  ECHO Can't find HEPVis package.  && GOTO obuild_return
377FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
378cd "%obuild_snovis_path%\%obuild_dir_bin%"
379IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
380FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  HEPVis v6r*`) DO SET obuild_HEPVis_path=%%j
381cd "%obuild_pwd_snovis_0%"
382SET obuild_pwd_snovis_0=
383IF NOT DEFINED obuild_HEPVis_path  ECHO Can't find HEPVis package.  && GOTO obuild_return
384FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
385cd "%obuild_snovis_path%\%obuild_dir_bin%"
386IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
387FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  jpeg v1r*`) DO SET obuild_jpeg_path=%%j
388cd "%obuild_pwd_snovis_0%"
389SET obuild_pwd_snovis_0=
390IF NOT DEFINED obuild_jpeg_path  ECHO Can't find jpeg package.  && GOTO obuild_return
391FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
392cd "%obuild_snovis_path%\%obuild_dir_bin%"
393IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
394FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  dvi2bitmap v1r*`) DO SET obuild_dvi2bitmap_path=%%j
395cd "%obuild_pwd_snovis_0%"
396SET obuild_pwd_snovis_0=
397IF NOT DEFINED obuild_dvi2bitmap_path  ECHO Can't find dvi2bitmap package.  && GOTO obuild_return
398FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
399cd "%obuild_snovis_path%\%obuild_dir_bin%"
400IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
401FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  freetype2 v1r*`) DO SET obuild_freetype2_path=%%j
402cd "%obuild_pwd_snovis_0%"
403SET obuild_pwd_snovis_0=
404IF NOT DEFINED obuild_freetype2_path  ECHO Can't find freetype2 package.  && GOTO obuild_return
405FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
406cd "%obuild_snovis_path%\%obuild_dir_bin%"
407IF NOT EXIST obuild_find.exe  ECHO Program obuild_find.exe not found.  && GOTO obuild_return
408FOR /F "usebackq delims=;" %%j IN (`.\obuild_find.exe  CoinGL v1r*`) DO SET obuild_CoinGL_path=%%j
409cd "%obuild_pwd_snovis_0%"
410SET obuild_pwd_snovis_0=
411IF NOT DEFINED obuild_CoinGL_path  ECHO Can't find CoinGL package.  && GOTO obuild_return
412
413SET obuild_cxx_includes=/I"%obuild_snovis_path%"
414SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_Lib_path%\include"
415SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_Slash_path%"
416SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_AIDA_path%\src\cpp"
417SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_OnX_path%\include"
418SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_G4Lab_path%\include"
419SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_BatchLab_path%"
420SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_HEPVis_path%\include"
421SET obuild_cxx_includes=%obuild_cxx_includes% /I"%obuild_CoinGL_path%\include"
422FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
423cd "%obuild_snovis_path%\%obuild_dir_bin%"
424IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
425FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
426cd "%obuild_pwd_snovis_0%"
427SET obuild_pwd_snovis_0=
428IF NOT %obuild_platform_result% == yes GOTO end_if_platform_29
429SET obuild_cxx_includes=%obuild_cxx_includes% -I/System/Library/Frameworks/OpenGL.framework/Headers
430:end_if_platform_29
431SET obuild_platform_result=
432FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
433cd "%obuild_snovis_path%\%obuild_dir_bin%"
434IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
435FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% OSF1`) DO SET obuild_platform_result=%%j
436cd "%obuild_pwd_snovis_0%"
437SET obuild_pwd_snovis_0=
438IF NOT %obuild_platform_result% == yes GOTO end_if_platform_30
439SET obuild_cxx_includes=%obuild_cxx_includes% -I${OBUILD_OPENGL_HOME}/include
440:end_if_platform_30
441SET obuild_platform_result=
442
443IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\dll_snovis" RMDIR /S /Q "%obuild_snovis_path%\%obuild_dir_bin%\dll_snovis"
444IF NOT EXIST "%obuild_snovis_path%\%obuild_dir_bin%\dll_snovis" MKDIR "%obuild_snovis_path%\%obuild_dir_bin%\dll_snovis"
445
446@IF %obuild_verbose% == yes @ECHO ON
447cd "%obuild_snovis_path%\%obuild_dir_bin%"
448%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
449@IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
450@IF NOT ERRORLEVEL 1 @DEL cl_exe_error
451cd "%obuild_snovis_path%\obuild"
452
453cd "%obuild_snovis_path%\%obuild_dir_bin%"
454%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
455@IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
456@IF NOT ERRORLEVEL 1 @DEL cl_exe_error
457cd "%obuild_snovis_path%\obuild"
458
459cd "%obuild_snovis_path%\%obuild_dir_bin%"
460%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
461@IF ERRORLEVEL 1 @TYPE cl_exe_error && @GOTO obuild_return
462@IF NOT ERRORLEVEL 1 @DEL cl_exe_error
463cd "%obuild_snovis_path%\obuild"
464
465@IF %obuild_verbose% == yes @ECHO OFF
466
467SET obuild_linked_libraries="%obuild_Lib_path%\%obuild_dir_bin%\LibXML.lib"
468SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_expat_path%\%obuild_dir_bin%\osc_expat.lib"
469SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_Lib_path%\%obuild_dir_bin%\LibZip.lib"
470SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_zlib_path%\%obuild_dir_bin%\osc_z.lib"
471SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_Lib_path%\%obuild_dir_bin%\LibUtils.lib"
472SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_HEPVis_path%\%obuild_dir_bin%\HEPVisGeometry.lib"
473SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_HEPVis_path%\%obuild_dir_bin%\HEPVisUtils.lib"
474SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_jpeg_path%\%obuild_dir_bin%\osc_jpeg.lib"
475SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_dvi2bitmap_path%\%obuild_dir_bin%\osc_dvi2bitmap.lib"
476SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_freetype2_path%\%obuild_dir_bin%\osc_freetype2.lib"
477SET obuild_linked_libraries=%obuild_linked_libraries% "%obuild_CoinGL_path%\%obuild_dir_bin%\osc_Coin.lib"
478FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
479cd "%obuild_snovis_path%\%obuild_dir_bin%"
480IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
481FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
482cd "%obuild_pwd_snovis_0%"
483SET obuild_pwd_snovis_0=
484IF NOT %obuild_platform_result% == yes GOTO end_if_platform_45
485SET obuild_linked_libraries=%obuild_linked_libraries% -framework OpenGL -framework AGL
486:end_if_platform_45
487SET obuild_platform_result=
488FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
489cd "%obuild_snovis_path%\%obuild_dir_bin%"
490IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
491FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Darwin`) DO SET obuild_platform_result=%%j
492cd "%obuild_pwd_snovis_0%"
493SET obuild_pwd_snovis_0=
494IF NOT %obuild_platform_result% == yes GOTO end_if_platform_46
495SET obuild_linked_libraries=%obuild_linked_libraries% -framework ApplicationServices
496:end_if_platform_46
497SET obuild_platform_result=
498FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
499cd "%obuild_snovis_path%\%obuild_dir_bin%"
500IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
501FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Linux`) DO SET obuild_platform_result=%%j
502cd "%obuild_pwd_snovis_0%"
503SET obuild_pwd_snovis_0=
504IF NOT %obuild_platform_result% == yes GOTO end_if_platform_47
505SET obuild_linked_libraries=%obuild_linked_libraries% -L/usr/lib -lGLU -lGL -lm
506:end_if_platform_47
507SET obuild_platform_result=
508FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
509cd "%obuild_snovis_path%\%obuild_dir_bin%"
510IF NOT EXIST .\obuild_platform.exe  ECHO Program obuild_platform.exe not found.  && GOTO obuild_return
511FOR /F "usebackq" %%j IN (`.\obuild_platform.exe  %obuild_platform% Windows_NT`) DO SET obuild_platform_result=%%j
512cd "%obuild_pwd_snovis_0%"
513SET obuild_pwd_snovis_0=
514IF NOT %obuild_platform_result% == yes GOTO end_if_platform_48
515SET obuild_linked_libraries=%obuild_linked_libraries% glu32.lib opengl32.lib gdi32.lib user32.lib
516:end_if_platform_48
517SET obuild_platform_result=
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% OSF1`) 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_49
525SET obuild_linked_libraries=%obuild_linked_libraries% -L${OBUILD_OPENGL_HOME}/lib -lGLU -lGL -lm
526:end_if_platform_49
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% UNIX`) 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_50
535SET obuild_linked_libraries=%obuild_linked_libraries% -lpthread
536:end_if_platform_50
537SET obuild_platform_result=
538
539FOR /F "usebackq delims=;" %%d IN (`cd`) DO SET obuild_pwd_snovis_0=%%d
540cd "%obuild_snovis_path%\%obuild_dir_bin%"
541IF EXIST .\dll_snovis\tmp_objs DEL .\dll_snovis\tmp_objs
542FOR %%f IN (.\dll_snovis\*.obj) DO ECHO %%f >> .\dll_snovis\tmp_objs
543
544REM # Create the archive library snovis :
545@IF %obuild_verbose% == yes @ECHO ON
546lib.exe /nologo /machine:ix86 /out:.\dll_snovis\snovis.arc @.\dll_snovis\tmp_objs
547@IF ERRORLEVEL 1 @GOTO obuild_return
548@IF %obuild_verbose% == yes @ECHO OFF
549
550REM # Build the obuild_windef.exe utility program :
551cl.exe /nologo /DWIN32 /MD /O2 /W3 /Feobuild_windef.exe "%obuild_snovis_path%\obuild\cpp\obuild_windef.c" 1> NUL
552IF EXIST obuild_windef.obj DEL obuild_windef.obj
553
554REM # Building the .def file :
555@IF %obuild_verbose% == yes @ECHO ON
556dumpbin.exe /symbols /out:.\dll_snovis\tmp .\dll_snovis\snovis.arc 1> dumpbin_exe_error .\dll_snovis\snovis.arc
557@IF ERRORLEVEL 1 @TYPE dumpbin_exe_error && @GOTO obuild_return
558@IF NOT ERRORLEVEL 1 @DEL dumpbin_exe_error
559@IF %obuild_verbose% == yes @ECHO OFF
560.\obuild_windef.exe snovis < .\dll_snovis\tmp > .\dll_snovis\snovis.def
561REM # Building the linking library :
562REM # It produces a .exp file.
563@IF %obuild_verbose% == yes @ECHO ON
564lib.exe /nologo /machine:ix86 /out:.\dll_snovis\snovis.lib /def:.\dll_snovis\snovis.def 1> lib_exe_error
565@IF ERRORLEVEL 1 @TYPE lib_exe_error && @GOTO obuild_return
566@IF NOT ERRORLEVEL 1 @DEL lib_exe_error
567@IF %obuild_verbose% == yes @ECHO OFF
568
569REM # Building the DLL :
570IF EXIST .\snovis.dll DEL .\snovis.dll
571@IF %obuild_verbose% == yes @ECHO ON
572link.exe /nologo /dll /out:.\snovis.dll .\dll_snovis\snovis.exp .\dll_snovis\snovis.arc %obuild_linked_libraries%
573@IF %obuild_verbose% == yes @ECHO OFF
574
575cd "%obuild_pwd_snovis_0%"
576SET obuild_pwd_snovis_0=
577REM # Some cleanup :
578IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\dll_snovis\tmp_objs" DEL "%obuild_snovis_path%\%obuild_dir_bin%\dll_snovis\tmp_objs"
579IF EXIST "%obuild_snovis_path%\%obuild_dir_bin%\snovis.exp" DEL "%obuild_snovis_path%\%obuild_dir_bin%\snovis.exp"
580
581:obuild_return
582ENDLOCAL
583@ECHO ON
Note: See TracBrowser for help on using the repository browser.