/[Slicer3]/oldtrunk/slicer_variables.tcl
ViewVC logotype

Contents of /oldtrunk/slicer_variables.tcl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2499 - (show annotations) (download) (as text)
Thu Feb 8 13:31:41 2007 UTC (10 years, 8 months ago) by pieper
Original Path: trunk/slicer_variables.tcl
File MIME type: application/x-tcl
File size: 12662 byte(s)
ENH: move status print about make  from slicer_variables to getbuildtst
1
2 #
3 # Note: this local vars file overrides sets the default environment for :
4 # Scripts/genlib.tcl -- make all the support libs
5 # Scripts/cmaker.tcl -- makes slicer code
6 # launch.tcl -- sets up the runtime env and starts slicer
7 # Scripts/tarup.tcl -- makes a tar.gz files with all the support files
8 #
9 # - use this file to set your local environment and then your change won't
10 # be overwritten when those files are updated through CVS
11 #
12
13
14 ## variables that are the same for all systems
15 set ::SLICER_DATA_ROOT ""
16
17 if {[info exists ::env(SLICER_HOME)]} {
18 # already set by the launcher
19 set ::SLICER_HOME $::env(SLICER_HOME)
20 } else {
21 # if sourcing this into cmaker, SLICER_HOME may not be set
22 # set the SLICER_HOME directory to the one in which this script resides
23 set cwd [pwd]
24 cd [file dirname [info script]]
25 set ::SLICER_HOME [pwd]
26 set ::env(SLICER_HOME) $::SLICER_HOME
27 cd $cwd
28 }
29
30 # set up variables for the OS Builds, to facilitate the move to solaris9
31 # - solaris can be solaris8 or solaris9
32 set ::SOLARIS "solaris8"
33 set ::LINUX "linux-x86"
34 set ::LINUX_64 "linux-x86_64"
35 set ::DARWIN "darwin-ppc"
36 set ::DARWIN_X86 "darwin-x86"
37 set ::WINDOWS "win32"
38
39 #
40 # set the default locations for the main components
41 #
42 switch $::tcl_platform(os) {
43 "SunOS" { set ::env(BUILD) $::SOLARIS }
44 "Linux" {
45 if {$::tcl_platform(machine) == "x86_64"} {
46 set ::env(BUILD) $::LINUX_64
47 } else {
48 set ::env(BUILD) $::LINUX
49 }
50 }
51 "Darwin" {
52 if {$::tcl_plafrom(machine) == "i386"} {
53 set ::env(BUILD) $::DARWIN_X86
54 } else {
55 set ::env(BUILD) $::DARWIN
56 }
57 }
58 default {
59 set ::env(BUILD) $::WINDOWS
60 set ::SLICER_HOME [file attributes $::SLICER_HOME -shortname]
61 set ::env(SLICER_HOME) $::SLICER_HOME
62 }
63 }
64
65 puts stderr "SLICER_HOME is $::SLICER_HOME"
66
67 # Choose which library versions you want to compile against. These
68 # shouldn't be changed between releases except for testing purposes.
69 # If you change them and Slicer breaks, you get to keep both pieces.
70 #
71 # When modifying these variables, make sure to make appropriate
72 # changes in the "Files to test if library has already been built"
73 # section below, or genlib will happily build the library again.
74
75 #set ::SLICER_TAG "http://www.na-mic.org/svn/Slicer3/branches/Slicer3.0-PreAHMBeta"
76 set ::SLICER_TAG "http://www.na-mic.org/svn/Slicer3/trunk"
77 set ::CMAKE_TAG "CMake-2-4-2"
78 set ::TEEM_TAG "Teem-1-9-0-patches"
79 set ::KWWidgets_TAG "HEAD"
80 set ::VTK_TAG "VTK-5-0"
81 set ::ITK_TAG ITK-3-0
82 set ::TCL_TAG "core-8-4-6"
83 set ::TK_TAG "core-8-4-6"
84 set ::ITCL_TAG "itcl-3-2-1"
85 set ::IWIDGETS_TAG "iwidgets-4-0-1"
86 set ::BLT_TAG "blt24z"
87 set ::SANDBOX_TAG "http://svn.na-mic.org/svn/NAMICSandBox/branches/Slicer-2-6"
88
89 # Set library, binary, etc. paths...
90
91 # if SLICER_LIB and SLICER_BUILD haven't been set,
92 # then assume they are in the 'standard' places next to the source tree
93 # (as created by getbuildtest.tcl
94 if { ![info exists ::SLICER_LIB] } {
95 set wd [pwd]
96 cd $::SLICER_HOME/../Slicer3-lib
97 set ::SLICER_LIB [pwd]
98 cd $wd
99 }
100 if { ![info exists ::SLICER_BUILD] } {
101 set wd [pwd]
102 cd $::SLICER_HOME/../Slicer3-build
103 set ::SLICER_BUILD [pwd]
104 cd $wd
105 }
106
107 set ::TEEM_SRC_DIR $::SLICER_LIB/teem
108 set ::TEEM_BUILD_DIR $::SLICER_LIB/teem-build
109 set ::VTK_DIR $::SLICER_LIB/VTK-build
110 set ::VTK_SRC_DIR $::SLICER_LIB/VTK
111 set ::VTK_BUILD_TYPE "Debug"
112 set ::VTK_BUILD_SUBDIR ""
113 set ::env(VTK_BUILD_TYPE) $::VTK_BUILD_TYPE
114 set ::KWWidgets_BUILD_DIR $::SLICER_LIB/KWWidgets-build
115 set ::KWWIDGETS_DIR $::SLICER_LIB/KWWidgets
116 set ::ITK_BINARY_PATH $::SLICER_LIB/Insight-build
117 set ::SANDBOX_BIN_DIR $::SLICER_LIB/NAMICSandBox-build/bin
118 set ::TCL_BIN_DIR $::SLICER_LIB/tcl-build/bin
119 set ::TCL_LIB_DIR $::SLICER_LIB/tcl-build/lib
120 set ::TCL_INCLUDE_DIR $::SLICER_LIB/tcl-build/include
121 set ::CMAKE_PATH $::SLICER_LIB/CMake-build
122 set ::SOV_BINARY_DIR ""
123 set ::XVNC_EXECUTABLE " "
124
125
126 # Files to test if library has already been built by genlib.tcl.
127
128 switch $::tcl_platform(os) {
129 "SunOS" -
130 "Linux" {
131 set shared_lib_ext "so"
132 }
133 "Darwin" {
134 set shared_lib_ext "dylib"
135 }
136 "Windows NT" {
137 set shared_lib_ext "dll"
138 }
139 }
140
141 # TODO: identify files for each platform
142
143 switch $::tcl_platform(os) {
144 "SunOS" -
145 "Darwin" {
146 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
147
148 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
149 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
150 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitclstub3.2.a
151 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
152 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
153 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
154 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
155 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.$shared_lib_ext
156 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
157 set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
158 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
159 set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
160 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
161 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
162 set ::TK_EVENT_PATCH $::SLICER_HOME/tkEventPatch.diff
163 set ::BLT_PATCH $::SLICER_HOME/blt-patch.diff
164 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
165 }
166 "Linux" {
167 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin
168
169 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh8.4
170 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish8.4
171 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/libitclstub3.2.a
172 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.1/iwidgets.tcl
173 set ::BLT_TEST_FILE $::TCL_BIN_DIR/bltwish24
174 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu
175 set ::VTK_TEST_FILE $::VTK_DIR/bin/vtk
176 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/libKWWidgets.so
177 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.so
178 set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/libSlicerClustering.a
179 set ::VTK_TCL_LIB $::TCL_LIB_DIR/libtcl8.4.$shared_lib_ext
180 set ::VTK_TK_LIB $::TCL_LIB_DIR/libtk8.4.$shared_lib_ext
181 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh8.4
182 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/libITKCommon.$shared_lib_ext
183 set ::TK_EVENT_PATCH $::SLICER_HOME/tkEventPatch.diff
184 set ::BLT_PATCH $::SLICER_HOME/blt-patch.diff
185 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
186 }
187 "Windows NT" {
188 # Windows NT currently covers WinNT, Win2000, XP Home, XP Pro
189
190 #
191 ### Set your peferred build type:
192 #
193 #set ::VTK_BUILD_TYPE RelWithDebInfo ;# good if you have the full (expensive) compiler
194 #set ::VTK_BUILD_TYPE Release ;# faster, but no debugging
195 #set ::VTK_BUILD_TYPE Debug ;# a good default
196 #set ::VTK_BUILD_TYPE RelWithDebInfo ;# a good default
197 set ::VTK_BUILD_SUBDIR $::VTK_BUILD_TYPE
198 set ::TEEM_BIN_DIR $::TEEM_BUILD_DIR/bin/$::VTK_BUILD_TYPE
199
200 set ::env(VTK_BUILD_SUBDIR) $::VTK_BUILD_SUBDIR
201 set ::TCL_TEST_FILE $::TCL_BIN_DIR/tclsh84.exe
202 set ::TK_TEST_FILE $::TCL_BIN_DIR/wish84.exe
203 set ::ITCL_TEST_FILE $::TCL_LIB_DIR/itcl3.2/itcl32.dll
204 set ::IWIDGETS_TEST_FILE $::TCL_LIB_DIR/iwidgets4.0.2/iwidgets.tcl
205 set ::BLT_TEST_FILE $::TCL_BIN_DIR/BLT24.dll
206 set ::TEEM_TEST_FILE $::TEEM_BIN_DIR/unu.exe
207 set ::VTK_TEST_FILE $::VTK_DIR/bin/$::VTK_BUILD_TYPE/vtk.exe
208 set ::KWWidgets_TEST_FILE $::KWWidgets_BUILD_DIR/bin/$::env(VTK_BUILD_SUBDIR)/KWWidgets.lib
209 set ::SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/$::VTK_BUILD_TYPE/SlicerClustering.lib
210 set ::ALT_SANDBOX_TEST_FILE $::SANDBOX_BIN_DIR/$::VTK_BUILD_TYPE/SlicerClustering.lib
211 set ::VTK_TCL_LIB $::TCL_LIB_DIR/tcl84.lib
212 set ::VTK_TK_LIB $::TCL_LIB_DIR/tk84.lib
213 set ::VTK_TCLSH $::TCL_BIN_DIR/tclsh84.exe
214 set ::ITK_TEST_FILE $::ITK_BINARY_PATH/bin/$::VTK_BUILD_TYPE/ITKCommon.dll
215
216 }
217 default {
218 puts stderr "Could not match platform \"$::tcl_platform(os)\"."
219 exit
220 }
221 }
222
223 # System dependent variables
224
225 switch $::tcl_platform(os) {
226 "SunOS" {
227 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
228 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
229 set ::GENERATOR "Unix Makefiles"
230 set ::COMPILER_PATH "/local/os/bin"
231 set ::COMPILER "g++"
232 set ::CMAKE $::CMAKE_PATH/bin/cmake
233 set ::MAKE "gmake"
234 set ::SERIAL_MAKE "gmake"
235 }
236 "Linux" {
237 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.so
238 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.so
239 set ::GENERATOR "Unix Makefiles"
240 set ::COMPILER_PATH "/usr/bin"
241 set ::COMPILER "g++"
242 set ::CMAKE $::CMAKE_PATH/bin/cmake
243 set numCPUs [lindex [exec grep processor /proc/cpuinfo | wc] 0]
244 set ::MAKE "make -j [expr $numCPUs * 2]"
245 set ::SERIAL_MAKE "make"
246 }
247 "Darwin" {
248 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBase.dylib
249 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/vtkSlicerBaseTCL.dylib
250 set ::GENERATOR "Unix Makefiles"
251 set ::COMPILER_PATH "/usr/bin"
252 set ::COMPILER "g++"
253 set ::CMAKE $::CMAKE_PATH/bin/cmake
254 set ::MAKE make
255 set ::SERIAL_MAKE make
256 }
257 default {
258 # different windows machines say different things, so assume
259 # that if it doesn't match above it must be windows
260 # (VC7 is Visual C++ 7.0, also known as the .NET version)
261
262
263 set ::VTKSLICERBASE_BUILD_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBase.lib
264 set ::VTKSLICERBASE_BUILD_TCL_LIB $::SLICER_HOME/Base/builds/$::env(BUILD)/bin/$::VTK_BUILD_TYPE/vtkSlicerBaseTCL.lib
265
266 set ::CMAKE $::CMAKE_PATH/bin/cmake.exe
267
268 set MSVC6 0
269 #
270 ## match this to the version of the compiler you have:
271 #
272
273 ## for Visual Studio 6:
274 #set ::GENERATOR "Visual Studio 6"
275 #set ::MAKE "msdev"
276 #set ::COMPILER_PATH ""
277 #set MSVC6 1
278
279 if {[info exists ::env(MSVC6)]} {
280 set ::MSVC6 $::env(MSVC6)
281 } else {
282 }
283
284 ## for Visual Studio 7:
285 if {[info exists ::env(GENERATOR)]} {
286 set ::GENERATOR $::env(GENERATOR)
287 } else {
288 set ::GENERATOR "Visual Studio 7"
289 }
290
291 if {[info exists ::env(MAKE)]} {
292 set ::MAKE $::env(MAKE)
293 } else {
294 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/IDE/devenv"
295 }
296
297 if {[info exists ::env(COMPILER_PATH)]} {
298 set ::COMPILER_PATH $::env(COMPILER_PATH)
299 } else {
300 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET/Common7/Vc7/bin"
301 }
302
303 #
304 ## for Visual Studio 7.1:
305 # - automatically use newer if available
306 #
307 if { [file exists "c:/Program Files/Microsoft Visual Studio .NET 2003/Common7/IDE/devenv.exe"] } {
308 set ::GENERATOR "Visual Studio 7 .NET 2003"
309 set ::MAKE "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Common7/IDE/devenv"
310 set ::COMPILER_PATH "c:/Program\ Files/Microsoft\ Visual\ Studio\ .NET 2003/Vc7/bin"
311 }
312
313 #
314 ## for Visual Studio 8
315 # - automatically use newest if available
316 # - use full if available, otherwise express
317 #
318 if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"] } {
319 set ::GENERATOR "Visual Studio 8 2005"
320 set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"
321 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
322 }
323
324
325 if { [file exists "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"] } {
326 set ::GENERATOR "Visual Studio 8 2005"
327 set ::MAKE "c:/Program Files/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
328 set ::COMPILER_PATH "c:/Program Files/Microsoft Visual Studio 8/VC/bin"
329 }
330
331 set ::COMPILER "cl"
332 set ::SERIAL_MAKE $::MAKE
333 }
334 }
335
336

  ViewVC Help
Powered by ViewVC 1.1.22