summaryrefslogtreecommitdiffhomepage
path: root/env.sh
blob: ea60f3781b547fdaa64ce91750c710aa5adc326c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Sourcing this file should set up the environment to build the app

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

case "$(uname -s)" in
  Linux*)
    TARGET="x86_64-unknown-linux-gnu"
    ;;
  Darwin*)
    TARGET="x86_64-apple-darwin"
    ;;
  MINGW*|MSYS_NT*)
    TARGET="x86_64-pc-windows-msvc"
    ;;
esac

case "$TARGET" in
  *linux*)
    export LIBMNL_LIB_DIR="$SCRIPT_DIR/dist-assets/binaries/$TARGET"
    export LIBNFTNL_LIB_DIR="$SCRIPT_DIR/dist-assets/binaries/$TARGET"
    ;;
  *darwin*)
    export MACOSX_DEPLOYMENT_TARGET="10.7"
    ;;
  *windows*)
    ;;
  *)
    echo "Unknown target \"$TARGET\"" >&2
    exit 1
    ;;
esac