Admin/exec_process/build
author hoelzl
Wed, 02 Apr 2014 18:35:07 +0200
changeset 56371 fb9ae0727548
parent 49447 bec1add86e79
permissions -rwxr-xr-x
extend continuous_intros; remove continuous_on_intros and isCont_intros

#!/usr/bin/env bash
#
# Multi-platform build script

THIS="$(cd "$(dirname "$0")"; pwd)"
PRG="$(basename "$0")"


# diagnostics

function usage()
{
  echo
  echo "Usage: $PRG TARGET"
  echo
  exit 1
}

function fail()
{
  echo "$1" >&2
  exit 2
}


# command line args

[ "$#" -eq 0 ] && usage
TARGET="$1"; shift

[ "$#" -eq 0 ] || usage


# main

mkdir -p "$TARGET"

case "$TARGET" in
  x86_64-linux | x86_64-darwin)
    cc -m64 exec_process.c -o "$TARGET/exec_process"
    ;;
  x86-linux | x86-darwin)
    cc -m32 exec_process.c -o "$TARGET/exec_process"
    ;;
  x86-cygwin)
    cc exec_process.c -o "$TARGET/exec_process.exe"
    ;;
  *)
    cc exec_process.c -o "$TARGET/exec_process"
    ;;
esac