# FILE: wintel.tcl # # Configuration feature definitions for the configuration 'wintel' # # Editing instructions begin at "START EDIT HERE" below. set config [Oc_Config RunPlatform] if {![string match [string tolower [file rootname [file tail [info script]]]] \ [$config GetValue platform_name]]} { error "Configuration cache file '[info script]' sourced by '[$config GetValue platform_name]'" } ######################################################################## # START EDIT HERE # In order to properly build, install, and run on your computing # platform, the OOMMF software must know certain features of your # computing environment. In this file are lines which set the value of # certain features of your computing environment. Each line looks like: # # $config SetValue {} # # where each is the name of some feature of interest, # and is the value which is assigned to that feature in a # description of your computing environment. Your task is to edit # the values as necessary to properly describe your computing # environment. # # The character '#' at the beginning of a line is a comment character. # It causes the contents of that line to be ignored. To select # among lines providing alternative values for a feature, uncomment the # line containing the proper value. # # The features in this file are divided into three sections. The first # section (REQUIRED CONFIGURATION) includes features which require you # to provide a value. The second section (OPTIONAL CONFIGURATION) # includes features which have usable default values, but which you # may wish to customize. The third section (ADVANCED CONFIGURATION) # contains features which you probably do not need or want to change # without a good reason. ######################################################################## # REQUIRED CONFIGURATION # NOTE: The rest of the REQUIRED CONFIGURATION is required only # for building OOMMF software from source code. If you downloaded # a distribution with pre-compiled executables, no more configuration # is required. # Set the feature 'program_compiler_c++' to the program to run on this # platform to compile source code files written in the language C++ into # object files. Select from the choices below. If the compiler is not # in your path, be sure to use the whole pathname. Also include any # options required to instruct your compiler to only compile, not link. # # If your compiler is not listed below, additional features will # have to be added in the ADVANCED CONFIGURATION section below to # describe to the OOMMF software how to operate your compiler. Send # e-mail to the OOMMF developers for assistance. # # Microsoft Visual C++ # $config SetValue program_compiler_c++ {cl /nologo /c /GX /GR} # # Intel C++ #$config SetValue program_compiler_c++ {icl /nologo /c /GX /GR} # # Borland C++ 5.5 Win32 command line tools. # #$config SetValue program_compiler_c++ {bcc32 -c} # # It may also be necessary to add something like the following to # the C++ code: # # #ifndef STATIC_BUILD # #if defined(_MSC_VER) # # define EXPORT(a,b) __declspec(dllexport) a b # # define DllEntryPoint DllMain # #else # # if defined(__BORLANDC__) # # define EXPORT(a,b) a _export b # # else # # define EXPORT(a,b) a b # # endif # #endif # #endif # ######################################################################## # OPTIONAL CONFIGURATION # Set the feature 'path_directory_temporary' to the name of an existing # directory on your computer in which OOMMF software should write # temporary files. All OOMMF users must have write access to this # directory. # # $config SetValue path_directory_temporary {C:\temp} # $config SetValue path_directory_temporary {C:\} ######################################################################## # ADVANCED CONFIGURATION # Compiler option processing... set ccbasename [file tail [lindex [$config GetValue program_compiler_c++] 0]] if {[string match cl $ccbasename]} { # ... for Microsoft Visual C++ # Default optimization # $config SetValue program_compiler_c++_option_opt {} # Options: # Maximum optimization: /Ox # Enable runtime debug checks: /GZ # Optimize for Pentium processor: /G5 # Optimize for Pentium Pro: /G6 #$config SetValue program_compiler_c++_option_opt {format "/GZ"} $config SetValue program_compiler_c++_option_opt {format "/Ox"} # NOTE: If you want good performance, be sure to edit ../options.tcl # or ../local/options.tcl to include the line # Oc_Option Add * Platform cflags {-def NDEBUG} # so that the NDEBUG symbol is defined during compile. $config SetValue program_compiler_c++_option_out {format "\"/Fo%s\""} $config SetValue program_compiler_c++_option_src {format "\"/Tp%s\""} $config SetValue program_compiler_c++_option_inc {format "\"/I%s\""} $config SetValue program_compiler_c++_option_warn {format "/W4"} # $config SetValue program_compiler_c++_option_debug {format "/MLd"} $config SetValue program_compiler_c++_option_debug {format "/Zi"} $config SetValue program_compiler_c++_option_def {format "\"/D%s\""} # Use OOMMF supplied erf() error function $config SetValue program_compiler_c++_property_no_erf 1 # Widest natively support floating point type $config SetValue program_compiler_c++_typedef_realwide "double" # The program to run on this platform to create a single library file out # of many object files. # Microsoft Visual C++'s library maker $config SetValue program_libmaker {link /lib} # If your link doesn't accept the /lib option, try this instead: # $config SetValue program_libmaker {lib} # The program to run on this platform to link together object files and # library files to create an executable binary. # Microsoft Visual C++'s linker $config SetValue program_linker {link} } elseif {[string match icl $ccbasename]} { # ... for Intel C++ # Default optimization # $config SetValue program_compiler_c++_option_opt {} # Options: # Maximum optimization: /O3 # multi-file optimization: /Qipo # 80 bit register floating point: /Qpc80 # Enable runtime debug checks: /GZ # Optimize for Pentium processor: /G5 # Optimize for Pentium Pro, Pentium II abd Pentium III: /G6 # Optimize for Pentium 4: /G7 # Improved fp precision (some speed penalty): /Qprec # $config SetValue program_compiler_c++_option_opt {format "/Qpc80 /O3"} # # Note: Unfortunately, Intel C++ 5 fails with an "internal compiler # error" when building Oxs if /Qipo is enabled. -mjd, 2002-10-30 # # NOTE 2: If you want good performance, be sure to edit ../options.tcl # or ../local/options.tcl to include the line # Oc_Option Add * Platform cflags {-def NDEBUG} # so that the NDEBUG symbol is defined during compile. # $config SetValue program_compiler_c++_option_out {format "\"/Fo%s\""} $config SetValue program_compiler_c++_option_src {format "\"/Tp%s\""} $config SetValue program_compiler_c++_option_inc {format "\"/I%s\""} $config SetValue program_compiler_c++_option_warn {format "/W4"} # $config SetValue program_compiler_c++_option_debug {format "/MLd"} $config SetValue program_compiler_c++_option_def {format "\"/D%s\""} # Note: To enable debugging output, put "-debug 1" into the # options file, and include the "/DEBUG" switch in the # program_linker definition below. $config SetValue program_compiler_c++_option_debug {format "/Zi"} # Use OOMMF supplied erf() error function $config SetValue program_compiler_c++_property_no_erf 1 # Widest natively support floating point type $config SetValue program_compiler_c++_typedef_realwide "double" # The program to run on this platform to create a single library file out # of many object files. # Intel library maker $config SetValue program_libmaker {xilib} # The program to run on this platform to link together object files and # library files to create an executable binary. # Intel linker $config SetValue program_linker {xilink} # $config SetValue program_linker {xilink /DEBUG} } elseif {[string match bcc32 $ccbasename]} { # ... for Borland C++ ### Compile line should look like ### bcc32 -c -oOUT.obj -P infile.cc ### NOTE: Options must come first. $config SetValue program_compiler_c++_option_out {format "\"-o%s\""} $config SetValue program_compiler_c++_option_src {format "-P \"%s\""} $config SetValue program_compiler_c++_option_inc {format "\"-I%s\""} $config SetValue program_compiler_c++_option_warn \ {format "-w -w-8027 -w-8004 -w-8026"} # -w-8027 turns off warning messages about for and while loops not # being inlineable. 8004 is warning message about assigned value # being unused. 8026 warns about non-inlining of function because # of class pass by value. 8008 is conditional that are always # true or false. 8066 notifies about unreachable code. $config SetValue program_compiler_c++_option_debug {format "-v"} $config SetValue program_compiler_c++_option_def {format "\"-D%s\""} # Use OOMMF supplied erf() error function $config SetValue program_compiler_c++_property_no_erf 1 # Optimization # $config SetValue program_compiler_c++_option_opt {format "\"-O%s\""} $config SetValue program_compiler_c++_option_opt {format "-5 -Ox"} ## Where -5: pentium instructions, -Ox: fastest code # NOTE: If you want good performance, be sure to edit ../options.tcl # or ../local/options.tcl to include the line # Oc_Option Add * Platform cflags {-def NDEBUG} # so that the NDEBUG symbol is defined during compile. # Widest natively support floating point type $config SetValue program_compiler_c++_typedef_realwide "double" # Work arounds # $config SetValue program_compiler_c++_property_strict_atan2 1 ## The above should be set automatically based on the results ## from oommf/ext/oc/varinfo.cc. # The program to run on this platform to create a single library file out # of many object files. # Borland librarian $config SetValue program_libmaker {tlib} # The program to run on this platform to link together object files and # library files to create an executable binary. # Borland linker # $config SetValue program_linker {ilink32 -Gn -aa -x c0x32} $config SetValue program_linker {ilink32 -Gn -x c0x32} } unset ccbasename # Library making option processing... if {[catch {$config GetValue program_libmaker} libbasename]} { set libbasename {} ;# No librarian specified } else { set libbasename [file tail [lindex $libbasename 0]] } if {[string match lib $libbasename] || [string match link $libbasename]} { # ...for Microsoft VC++ lib or "link /lib" $config SetValue program_libmaker_option_obj {format \"%s\"} $config SetValue program_libmaker_option_out {format "\"/OUT:%s\""} } elseif {[string match xilib $libbasename]} { # ...for Intel lib $config SetValue program_libmaker_option_obj {format \"%s\"} $config SetValue program_libmaker_option_out {format "\"/OUT:%s\""} } elseif {[string match tlib $libbasename]} { # ...for Borland librarian proc fibar { name } { return [list +[file nativename $name]] } $config SetValue program_libmaker_option_obj {fibar} proc fifibar { name } { return [list [file nativename $name]] } $config SetValue program_libmaker_option_out {fifibar} } unset libbasename # Linker option processing... set linkbasename [file tail [lindex [$config GetValue program_linker] 0]] if {[string match link $linkbasename]} { # ...for Microsoft VC++ linker $config SetValue program_linker_option_obj {format \"%s\"} $config SetValue program_linker_option_out {format "\"/OUT:%s\""} $config SetValue program_linker_option_lib {format \"%s\"} $config SetValue program_linker_option_sub {format "\"/SUBSYSTEM:%s\""} $config SetValue TCL_LIB_SPEC [$config GetValue TCL_VC_LIB_SPEC] $config SetValue TK_LIB_SPEC [$config GetValue TK_VC_LIB_SPEC] $config SetValue TK_LIBS {user32.lib} $config SetValue TCL_LIBS {user32.lib} $config SetValue program_linker_uses_-L-l {0} $config SetValue program_linker_uses_-I-L-l {0} } elseif {[string match xilink $linkbasename]} { # ...for Intel linker $config SetValue program_linker_option_obj {format \"%s\"} $config SetValue program_linker_option_out {format "\"/OUT:%s\""} $config SetValue program_linker_option_lib {format \"%s\"} $config SetValue program_linker_option_sub {format "\"/SUBSYSTEM:%s\""} $config SetValue TCL_LIB_SPEC [$config GetValue TCL_VC_LIB_SPEC] $config SetValue TK_LIB_SPEC [$config GetValue TK_VC_LIB_SPEC] $config SetValue TK_LIBS {user32.lib} $config SetValue TCL_LIBS {user32.lib} $config SetValue program_linker_uses_-L-l {0} $config SetValue program_linker_uses_-I-L-l {0} } elseif {[string match ilink32 $linkbasename]} { # ...for Borland linker ### Seems link line should look like ### ilink32 -Gn -aa -x c0x32.obj OBJS, outfile.exe,,LIBS import32 cw32 ### Order is important. The Tcl 7.5 build has the options ### -Tpe -ap -c pasted on in front (before c0x32.obj). I think ### -c means case sensitive, but not sure about the rest. ### -a? is application type, where -aa=Windows GUI, -ad=Native, ### and -ap=Windows character. -T?? is "output file type". ### Here -Gn=no state files, -x=no map. (Another option is ### -C=clear state before linking.) proc fubar { name } { return [list [file nativename $name]] } $config SetValue program_linker_option_obj {fubar} proc fufubar { name } { return " , [fubar $name] , , import32 cw32" } $config SetValue program_linker_option_out {fufubar} $config SetValue program_linker_option_lib {fubar} proc fufufubar { subsystem } { if {[string match CONSOLE $subsystem]} { return "-ap" ;# Windows character } return "-aa" ;# Windows GUI } $config SetValue program_linker_option_sub {fufufubar} set dummy [$config GetValue TCL_VC_LIB_SPEC] regsub {\.lib$} $dummy bc.lib dummy $config SetValue TCL_LIB_SPEC $dummy set dummy [$config GetValue TK_VC_LIB_SPEC] regsub {\.lib$} $dummy bc.lib dummy $config SetValue TK_LIB_SPEC $dummy $config SetValue TK_LIBS {} $config SetValue TCL_LIBS {} $config SetValue program_linker_uses_-L-l {0} $config SetValue program_linker_uses_-I-L-l {0} } unset linkbasename # The absolute, native filename of the null device $config SetValue path_device_null {nul:} # A partial Tcl command (or script) which when completed by lappending # a file name stem and evaluated returns the corresponding file name for # an executable on this platform $config SetValue script_filename_executable {format %s.exe} # A partial Tcl command (or script) which when completed by lappending # a file name stem and evaluated returns the corresponding file name for # an object file on this platform $config SetValue script_filename_object {format %s.obj} # A partial Tcl command (or script) which when completed by lappending # a file name stem and evaluated returns the corresponding file name for # a static library on this platform $config SetValue script_filename_static_library {format %s.lib} # A list of partial Tcl commands (or scripts) which when completed by # lappending a file name stem and evaluated returns the corresponding # file name for an intermediate file produced by the linker on this platform $config SetValue script_filename_intermediate [list {format %s.ilk} \ {format %s.pdb}] ######################################################################## unset config