1#!/bin/sh
2
3# output the right configuration (.build file) to use for the current OS
4
5cpu_name=`uname -m | sed y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/`
6os_name=`uname -s | sed y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/`
7cpu_type=`echo $HOSTTYPE`
8coremake_param="gcc_linux"
9
10#echo "CPU" $cpu_name
11#echo "OS" $os_name
12
13case $os_name in
14cygwin*)
15  coremake_param="gcc_linux"
16  ;;
17mingw* | pw32*)
18  coremake_param="gcc_win32"
19  ;;
20darwin* | rhapsody*)
21    case $cpu_type in
22        i*86)
23            coremake_param="gcc_osx_x86"
24            ;;
25        powerpc*)
26            coremake_param="gcc_osx_ppc"
27            ;;
28        x86_64)
29            coremake_param="gcc_osx_x64"
30            ;;
31    esac
32  ;;
33linux* | freebsd* | kfreebsd*-gnu | dragonfly*)
34    case $cpu_name in
35        i*86)
36            coremake_param="gcc_linux"
37            ;;
38        x86_64 | amd64)
39            coremake_param="gcc_linux_x64"
40            ;;
41        powerpc*)
42            coremake_param="gcc_linux_ppc"
43            ;;
44        arm*)
45            coremake_param="gcc_linux_arm"
46            ;;
47        mips*)
48            coremake_param="gcc_linux_mips"
49            ;;
50        sparc64)
51            coremake_param="gcc_linux_sparc64"
52            ;;
53        sparc*)
54            coremake_param="gcc_linux_sparc32"
55            ;;
56    esac
57  ;;
58esac
59
60echo $coremake_param
61exit
62