config revision 12027:1eb7dc7aa10b
1#! /bin/sh 2 3# set -x 4 5: ${LN_S:="ln -s"} 6 7# rm -f Makefile Makefile.md README.md qtmd.h qtmdb.s qtmdc.c qtmds.s configuration 8rm -f qtmdc.c qtmds.s configuration 9 10case $1 in 11 axp*) 12 : "DEC AXP" 13 case $1 in 14 axp-osf1*) 15 : "Compile using /bin/cc under OSF 1.x." 16# ${LN_S} md/axp.1.Makefile Makefile.md 17 ;; 18 axp-osf2*) 19 : "Compile using /bin/cc under OSF 2.x." 20# ${LN_S} md/axp.1.Makefile Makefile.md 21 ;; 22 *) 23 : "Compile using GNU CC." 24# ${LN_S} md/axp.Makefile Makefile.md 25 ;; 26 esac 27 28# ${LN_S} md/axp.h qtmd.h 29 ${LN_S} md/axp.c qtmdc.c 30 ${LN_S} md/axp.s qtmds.s 31# ${LN_S} md/axp_b.s qtmdb.s 32# ${LN_S} md/axp.README README.md 33 iter_init=1000000000 34 iter_runone=10000000 35 iter_blockint=10000000 36 iter_blockfloat=10000000 37 iter_vainit0=10000000 38 iter_vainit2=10000000 39 iter_vainit4=10000000 40 iter_vainit8=10000000 41 iter_vastart0=10000000 42 iter_vastart2=10000000 43 iter_vastart4=10000000 44 iter_vastart8=10000000 45 iter_bench_call_reg=10000000 46 iter_bench_call_imm=10000000 47 iter_bench_add=100000000 48 iter_bench_load=100000000 49 ;; 50 51 hppa*) 52 : "HP's PA-RISC 1.1 processors." 53 54 case $1 in 55 hppa-cnx-spp*) 56 : "Convex SPP (PA-RISC 1.1 processors)." 57# ${LN_S} md/hppa-cnx.Makefile Makefile.md 58 ;; 59 *) 60# ${LN_S} md/hppa.Makefile Makefile.md 61 ;; 62 esac 63 64# ${LN_S} md/hppa.h qtmd.h 65# ${LN_S} md/null.c qtmdc.c 66 ${LN_S} md/hppa.s qtmds.s 67# ${LN_S} md/hppa_b.s qtmdb.s 68 iter_init=10000000 69 iter_runone=1000000 70 iter_blockint=1000000 71 iter_blockfloat=1000000 72 iter_vainit0=1000000 73 iter_vainit2=1000000 74 iter_vainit4=1000000 75 iter_vainit8=1000000 76 iter_vastart0=1000000 77 iter_vastart2=1000000 78 iter_vastart4=1000000 79 iter_vastart8=1000000 80 iter_bench_call_reg=10000000 81 iter_bench_call_imm=10000000 82 iter_bench_add=100000000 83 iter_bench_load=100000000 84 ;; 85 86 x86_64*) 87 case $1 in 88 iX86-ss*) 89 : "Assembler comments '//'" 90 sed 's/\/\*/\/\//' < md/i386_64.s > qtmds.s 91 ;; 92 93 *) 94 ${LN_S} md/iX86_64.s qtmds.s 95 ;; 96 esac 97 : "Intel X386 64-bit and compatibles" 98# ${LN_S} md/null.c qtmdc.c 99 iter_init=10000000 100 iter_runone=1000000 101 iter_blockint=1000000 102 iter_blockfloat=1000000 103 iter_vainit0=1000000 104 iter_vainit2=1000000 105 iter_vainit4=1000000 106 iter_vainit8=1000000 107 iter_vastart0=1000000 108 iter_vastart2=1000000 109 iter_vastart4=1000000 110 iter_vastart8=1000000 111 iter_bench_call_reg=1000000 112 iter_bench_call_imm=1000000 113 iter_bench_add=100000000 114 iter_bench_load=10000000 115 ;; 116 117 iX86*) 118 case $1 in 119 iX86-ss*) 120 : "Assembler comments '//'" 121 sed 's/\/\*/\/\//' < md/i386.s > qtmds.s 122# sed 's/\/\*/\/\//' < md/i386_b.s > qtmdb.s 123 ;; 124 125 *) 126 ${LN_S} md/i386.s qtmds.s 127# ${LN_S} md/i386_b.s qtmdb.s 128 ;; 129 esac 130 : "Intel 80386 and compatibles (not '286...)" 131# ${LN_S} md/default.Makefile Makefile.md 132# ${LN_S} md/i386.h qtmd.h 133# ${LN_S} md/null.c qtmdc.c 134# ${LN_S} md/i386.README README.md 135 iter_init=10000000 136 iter_runone=1000000 137 iter_blockint=1000000 138 iter_blockfloat=1000000 139 iter_vainit0=1000000 140 iter_vainit2=1000000 141 iter_vainit4=1000000 142 iter_vainit8=1000000 143 iter_vastart0=1000000 144 iter_vastart2=1000000 145 iter_vastart4=1000000 146 iter_vastart8=1000000 147 iter_bench_call_reg=1000000 148 iter_bench_call_imm=1000000 149 iter_bench_add=100000000 150 iter_bench_load=10000000 151 ;; 152 153 154 m68k) 155 : "Motorola 68000 family -- incomplete!" 156# ${LN_S} md/default.Makefile Makefile.md 157# ${LN_S} md/m68k.h qtmd.h 158# ${LN_S} md/null.c qtmdc.c 159 ${LN_S} md/m68k.s qtmds.s 160# ${LN_S} md/m68k_b.s qtmdb.s 161# ${LN_S} md/null.README README.md 162 ;; 163 164 m88k) 165 : "Motorola 88000 family" 166# ${LN_S} md/m88k.Makefile Makefile.md 167# ${LN_S} md/m88k.h qtmd.h 168 ${LN_S} md/m88k.c qtmdc.c 169 ${LN_S} md/m88k.s qtmds.s 170# ${LN_S} md/m88k_b.s qtmdb.s 171# ${LN_S} md/null.README README.md 172 iter_init=1000000 173 iter_runone=100000 174 iter_blockint=100000 175 iter_blockfloat=100000 176 iter_vainit0=100000 177 iter_vainit2=100000 178 iter_vainit4=100000 179 iter_vainit8=100000 180 iter_vastart0=100000 181 iter_vastart2=100000 182 iter_vastart4=100000 183 iter_vastart8=100000 184 iter_bench_call_reg=100000000 185 iter_bench_call_imm=100000000 186 iter_bench_add=1000000000 187 iter_bench_load=100000000 188 ;; 189 190 mips*) 191 : "MIPS R2000 and R3000." 192 193 case $1 in 194 mips-irix5*) 195 : "Silicon Graphics Irix with dynamic linking" 196 : "Use mips for irix4." 197 ${LN_S} md/mips-irix5.s qtmds.s 198 ;; 199 *) 200 ${LN_S} md/mips.s qtmds.s 201 ;; 202 esac 203 204# ${LN_S} md/default.Makefile Makefile.md 205# ${LN_S} md/mips.h qtmd.h 206# ${LN_S} md/null.c qtmdc.c 207# ${LN_S} md/mips_b.s qtmdb.s 208# ${LN_S} md/null.README README.md 209 iter_init=10000000 210 iter_runone=10000000 211 iter_blockint=10000000 212 iter_blockfloat=10000000 213 iter_vainit0=1000000 214 iter_vainit2=1000000 215 iter_vainit4=1000000 216 iter_vainit8=1000000 217 iter_vastart0=1000000 218 iter_vastart2=1000000 219 iter_vastart4=1000000 220 iter_vastart8=1000000 221 iter_bench_call_reg=100000000 222 iter_bench_call_imm=100000000 223 iter_bench_add=1000000000 224 iter_bench_load=100000000 225 ;; 226 227 sparc*) 228 : "SPARC processors" 229 case $1 in 230 sparc-os2*) 231 sed 's/_qt_/qt_/' md/sparc.s > qtmds.s 232# sed 's/_b_/b_/' md/sparc_b.s > qtmdb.s 233# ${LN_S} md/solaris.README README.md 234 ;; 235 *) 236 ${LN_S} md/sparc.s qtmds.s 237# ${LN_S} md/sparc_b.s qtmdb.s 238# ${LN_S} md/null.README README.md 239 ;; 240 esac 241 242 ${LN_S} md/default.Makefile Makefile.md 243# ${LN_S} md/sparc.h qtmd.h 244# ${LN_S} md/null.c qtmdc.c 245 iter_init=10000000 246 iter_runone=1000000 247 iter_blockint=1000000 248 iter_blockfloat=1000000 249 iter_vainit0=1000000 250 iter_vainit2=1000000 251 iter_vainit4=1000000 252 iter_vainit8=1000000 253 iter_vastart0=1000000 254 iter_vastart2=1000000 255 iter_vastart4=1000000 256 iter_vastart8=1000000 257 iter_bench_call_reg=10000000 258 iter_bench_call_imm=10000000 259 iter_bench_add=100000000 260 iter_bench_load=100000000 261 ;; 262 263 vax*) 264 : "DEC VAX processors." 265# ${LN_S} md/default.Makefile Makefile.md 266# ${LN_S} md/vax.h qtmd.h 267# ${LN_S} md/null.c qtmdc.c 268 ${LN_S} md/vax.s qtmds.s 269# ${LN_S} md/vax_b.s qtmdb.s 270# ${LN_S} md/null.README README.md 271 iter_init=1000000 272 iter_runone=100000 273 iter_blockint=100000 274 iter_blockfloat=100000 275 iter_vainit0=100000 276 iter_vainit2=100000 277 iter_vainit4=100000 278 iter_vainit8=100000 279 iter_vastart0=100000 280 iter_vastart2=100000 281 iter_vastart4=100000 282 iter_vastart8=100000 283 iter_bench_call_reg=10000000 284 iter_bench_call_imm=10000000 285 iter_bench_add=10000000 286 iter_bench_load=1000000 287 ;; 288 289 ksr1) 290 : "Kendall Square Research model KSR-1." 291 : "Varargs is not currently supported." 292# ${LN_S} md/ksr1.Makefile Makefile.md 293# ${LN_S} md/ksr1.h qtmd.h 294# ${LN_S} md/null.c qtmdc.c 295 ${LN_S} md/ksr1.s qtmds.s 296# ${LN_S} md/ksr1_b.s qtmdb.s 297# ${LN_S} md/null.README README.md 298 iter_init=1000000 299 iter_runone=100000 300 iter_blockint=100000 301 iter_blockfloat=100000 302 iter_vainit0=100000 303 iter_vainit2=100000 304 iter_vainit4=100000 305 iter_vainit8=100000 306 iter_vastart0=100000 307 iter_vastart2=100000 308 iter_vastart4=100000 309 iter_vastart8=100000 310 iter_bench_call_reg=10000000 311 iter_bench_call_imm=10000000 312 iter_bench_add=10000000 313 iter_bench_load=1000000 314 ;; 315 316 powerpc*) 317 : "PowerPC IBM/Motorola processors." 318 319 case $1 in 320 powerpc-apple-macosx*) 321 : "PowerPC using Mach Application Binary Interface" 322 : "NOTICE: Darwin assembler syntax is used:" 323 : " (i.e. registers are named rx not %rx)" 324 ${LN_S} md/default.Makefile Makefile.md 325# ${LN_S} md/powerpc_mach.h qtmd.h 326 ${LN_S} md/powerpc_mach.s qtmds.s 327 ;; 328 powerpc-linux*) 329 : "PowerPC using System V Application Binary Interface" 330 : " (e.g. LinuxPPC)" 331 : "Use powerpc-darwin for MacOS X and other systems based on Mac 332h ABI" 333# ${LN_S} md/powerpc_sys5.h qtmd.h 334 ${LN_S} md/powerpc_sys5.s qtmds.s 335 ;; 336 *) 337 echo "Unknown configuration" 338 echo "See md/powerpc.README for documentation" 339 echo "Use powerpc-darwin for MacOS X and other systems based on 340Mach ABI" 341 echo "Use powerpc-linux for Linux and other systems based on Sys 342tem V ABI" 343 exit 1 344 ;; 345 346 esac 347 348 ${LN_S} md/powerpc.c qtmdc.c 349 ${LN_S} md/powerpc.README README.md 350 ;; 351 352 353 pthreads*) 354 : Posix thread support rather than Quick threads. 355# ${LN_S} md/hppa.h qtmd.h 356# ${LN_S} md/null.c qtmdc.c 357# ${LN_S} md/null.s qtmds.s 358# ${LN_S} md/hppa_b.s qtmdb.s 359# cp md/pthreads.Makefile Makefile 360 exit 0 361 ;; 362 363 clean) 364 : Deconfigure 365 exit 0 366 ;; 367 368 *) 369 echo "Unknown configuration" 370 exit 1 371 ;; 372esac 373 374# cat Makefile.md Makefile.base > Makefile 375 376echo set config_machine=$1 >> configuration 377echo set config_init=$iter_init >> configuration 378echo set config_runone=$iter_runone >> configuration 379echo set config_blockint=$iter_blockint >> configuration 380echo set config_blockfloat=$iter_blockfloat >> configuration 381echo set config_vainit0=$iter_vainit0 >> configuration 382echo set config_vainit2=$iter_vainit2 >> configuration 383echo set config_vainit4=$iter_vainit4 >> configuration 384echo set config_vainit8=$iter_vainit8 >> configuration 385echo set config_vastart0=$iter_vastart0 >> configuration 386echo set config_vastart2=$iter_vastart2 >> configuration 387echo set config_vastart4=$iter_vastart4 >> configuration 388echo set config_vastart8=$iter_vastart8 >> configuration 389echo set config_bcall_reg=$iter_bench_call_reg >> configuration 390echo set config_bcall_imm=$iter_bench_call_imm >> configuration 391echo set config_b_add=$iter_bench_add >> configuration 392echo set config_b_load=$iter_bench_load >> configuration 393