1@echo off 2rem Configuration Script for Microsoft Build Engine 3 4:start 5rem Default Configurations 6 7@echo # Configurations for Microsoft Build Engine > Makefile 8@echo. >> Makefile 9@echo. 10@set prefix= 11@set msvcrt=0 12@set notest=0 13@set omp=0 14@set intelc=0 15@set fortran=0 16@set msmpi32=0 17@set msmpi64=0 18@set impi=0 19@set saamg=0 20@set longlong=0 21@set longdouble=0 22@set complex=0 23@set debug=0 24@set noifpu=0 25@set usercflags= 26@set userfflags= 27@set userldflags= 28 29:again 30rem Build Options 31 32@if "%1" == "-h" goto usage 33@if "%1" == "--help" goto usage 34@if "%1" == "--prefix" goto setprefix 35@if "%1" == "--msvcrt" goto setmsvcrt 36@if "%1" == "--enable-omp" goto setomp 37@if "%1" == "--enable-msmpi32" goto setmsmpi32 38@if "%1" == "--enable-msmpi64" goto setmsmpi64 39@if "%1" == "--enable-impi" goto setimpi 40@if "%1" == "--enable-intelc" goto setintelc 41@if "%1" == "--enable-fortran" goto setfortran 42@if "%1" == "--enable-saamg" goto setsaamg 43@if "%1" == "--enable-longlong" goto setlonglong 44@if "%1" == "--enable-longdouble" goto setlongdouble 45@if "%1" == "--enable-complex" goto setcomplex 46@if "%1" == "--enable-debug" goto setdebug 47@if "%1" == "--disable-ifpu" goto setnoifpu 48@if "%1" == "--disable-test" goto setnotest 49@if "%1" == "--cflags" goto setusercflags 50@if "%1" == "--fflags" goto setuserfflags 51@if "%1" == "--ldflags" goto setuserldflags 52@if "%1" == "" goto genmakefile 53 54:usage 55 56@echo Usage: configure.bat [options] 57@echo. 58@echo Options: 59@echo. 60@echo. --prefix PREFIX Install Lis in directory PREFIX 61@echo. --msvcrt Use msvcrt*.dll instead of static crt 62@echo. --enable-omp Build with OpenMP library 63@echo. --enable-msmpi32 Build with 32bit Microsoft MPI library 64@echo. --enable-msmpi64 Build with 64bit Microsoft MPI library 65@echo. --enable-impi Build with Intel MPI library 66@echo. --enable-intelc Use Intel C Compiler 67@echo. --enable-fortran Enable Fortran interface 68@echo. --enable-saamg Enable SA-AMG preconditioner 69@echo. --enable-longlong Enable 64bit integer support 70@echo. --enable-longdouble Enable long double support 71@echo. --enable-complex Complex scalar support (for Intel Compilers) 72@echo. --enable-debug Enable debugging 73@echo. --disable-ifpu Disable Intel FPU support 74@echo. --disable-test Disable building test programs 75@echo. --cflags FLAG Pass FLAG to C compiler 76@echo. --fflags FLAG Pass FLAG to Fortran compiler 77@echo. --ldflags FLAG Pass FLAG to linker 78@echo. 79@goto end 80 81:setprefix 82 83@shift 84@set prefix=%1 85@shift 86@goto again 87 88:setmsvcrt 89 90@shift 91@set msvcrt=1 92@shift 93@goto again 94 95:setnotest 96 97@set notest=1 98@shift 99@goto again 100 101:setomp 102 103@set omp=1 104@shift 105@goto again 106 107:setmsmpi32 108 109@set msmpi32=1 110@shift 111@goto again 112 113:setmsmpi64 114 115@set msmpi64=1 116@shift 117@goto again 118 119:setimpi 120 121@set impi=1 122@set intelc=1 123@shift 124@goto again 125 126:setintelc 127 128@set intelc=1 129@shift 130@goto again 131 132:setfortran 133 134@set fortran=1 135@shift 136@goto again 137 138:setsaamg 139 140@set fortran=1 141@set saamg=1 142@shift 143@goto again 144 145:setlonglong 146 147@set longlong=1 148@shift 149@goto again 150 151:setlongdouble 152 153@set longdouble=1 154@shift 155@goto again 156 157:setcomplex 158 159@set complex=1 160@shift 161@goto again 162 163:setdebug 164 165@set debug=1 166@shift 167@goto again 168 169:setnoifpu 170 171@set noifpu=1 172@shift 173@goto again 174 175:setusercflags 176 177@shift 178@set usercflags=%~1 179@shift 180@goto again 181 182:setuserfflags 183 184@shift 185@set userfflags=%~1 186@shift 187@goto again 188 189:setuserldflags 190 191@shift 192@set userldflags=%~1 193@shift 194@goto again 195 196:genmakefile 197 198@echo # Installation directory >> Makefile 199@if not "(%prefix%)" == "()" ( 200@echo PREFIX=%prefix% >> Makefile 201) else ( 202@echo PREFIX=.. >> Makefile 203) 204@echo. >> Makefile 205 206@if (%msvcrt%) == (1) ( 207@echo # Use msvcrt*.dll instead of static runtime library >> Makefile 208@echo msvcrt=1 >> Makefile 209@echo. >> Makefile 210@echo. Use msvcrt*.dll instead of static crt = yes 211) else ( 212@echo. Use msvcrt*.dll instead of static crt = no 213) 214 215@if (%notest%) == (1) ( 216@echo # Disable building test programs >> Makefile 217@echo notest=1 >> Makefile 218@echo. >> Makefile 219@echo. Build test programs = no 220) else ( 221@echo. Build test programs = yes 222) 223 224@if (%omp%) == (1) ( 225@echo # Build with OpenMP library >> Makefile 226@echo omp=1 >> Makefile 227@echo. >> Makefile 228@echo. Build with OpenMP library = yes 229) else ( 230@echo. Build with OpenMP library = no 231) 232 233@if (%msmpi32%) == (1) ( 234@echo # Build with 32bit Microsoft MPI library >> Makefile 235@echo msmpi32=1 >> Makefile 236@echo. >> Makefile 237@echo. Build with 32bit Microsoft MPI library = yes 238) else ( 239@echo. Build with 32bit Microsoft MPI library = no 240) 241 242@if (%msmpi64%) == (1) ( 243@echo # Build with 64bit Microsoft MPI library >> Makefile 244@echo msmpi64=1 >> Makefile 245@echo. >> Makefile 246@echo. Build with 64bit Microsoft MPI library = yes 247) else ( 248@echo. Build with 64bit Microsoft MPI library = no 249) 250 251@if (%impi%) == (1) ( 252@echo # Build with Intel MPI library >> Makefile 253@echo impi=1 >> Makefile 254@echo. >> Makefile 255@echo. Build with Intel MPI library = yes 256) else ( 257@echo. Build with Intel MPI library = no 258) 259 260@if (%intelc%) == (1) ( 261@echo # Use Intel C Compiler >> Makefile 262@echo intelc=1 >> Makefile 263@echo. >> Makefile 264@echo. Use Intel C Compiler = yes 265) else ( 266@echo. Use Intel C Compiler = no 267) 268 269@if (%fortran%) == (1) ( 270@echo # Enable Fortran interface >> Makefile 271@echo fortran=1 >> Makefile 272@echo. >> Makefile 273@echo. Enable Fortran interface = yes 274) else ( 275@echo. Enable Fortran interface = no 276) 277 278@if (%saamg%) == (1) ( 279@echo # Enable SA-AMG preconditioner >> Makefile 280@echo saamg=1 >> Makefile 281@echo. >> Makefile 282@echo. Enable SA-AMG preconditioner = yes 283) else ( 284@echo. Enable SA-AMG preconditioner = no 285) 286 287@if (%longlong%) == (1) ( 288@echo # Enable 64bit integer support >> Makefile 289@echo longlong=1 >> Makefile 290@echo. >> Makefile 291@echo. Enable 64bit integer support = yes 292) else ( 293@echo. Enable 64bit integer support = no 294) 295 296@if (%longdouble%) == (1) ( 297@echo # Enable long double support >> Makefile 298@echo longdouble=1 >> Makefile 299@echo. >> Makefile 300@echo. Enable long double support = yes 301) else ( 302@echo. Enable long double support = no 303) 304 305@if (%complex%) == (1) if (%intelc%) == (1) ( 306@echo # Enable complex scalar support >> Makefile 307@echo complex=1 >> Makefile 308@echo. >> Makefile 309@echo. Enable complex scalar support = yes 310) else ( 311@echo. Enable complex scalar support = no 312) 313 314@if (%debug%) == (1) ( 315@echo. >> Makefile 316@echo. Enable debug mode = yes 317) else ( 318@echo # Disable Debugging >> Makefile 319@echo NODEBUG=1 >> Makefile 320@echo. >> Makefile 321@echo. Enable debug mode = no 322) 323 324@if (%noifpu%) == (1) ( 325@echo # Disable Intel FPU support >> Makefile 326@echo noifpu=1 >> Makefile 327@echo. >> Makefile 328@echo. Disable Intel FPU support = yes 329) else ( 330@echo. Disable Intel FPU support = no 331) 332 333@echo # User-defined C flags >> Makefile 334@if not "(%usercflags%)" == "()" ( 335@echo USER_CFLAGS = %usercflags% >> Makefile 336) else ( 337@echo USER_CFLAGS = >> Makefile 338) 339@echo. >> Makefile 340 341@echo # User-defined Fortran flags >> Makefile 342@if not "(%userfflags%)" == "()" ( 343@echo USER_FFLAGS = %userfflags% >> Makefile 344) else ( 345@echo USER_FFLAGS = >> Makefile 346) 347@echo. >> Makefile 348 349@echo # User-defined linker flags >> Makefile 350@if not "(%userldflags%)" == "()" ( 351@echo USER_LDFLAGS = %userldflags% >> Makefile 352) else ( 353@echo USER_LDFLAGS = >> Makefile 354) 355@echo. >> Makefile 356) 357 358@echo. >> Makefile 359@type Makefile.in >> Makefile 360@echo. 361 362:end 363