-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathx-build
More file actions
executable file
·95 lines (82 loc) · 1.76 KB
/
x-build
File metadata and controls
executable file
·95 lines (82 loc) · 1.76 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/bash
# $Id: x-build 597 2010-06-23 01:06:56Z zola $
#
# File: x-build
# Developed: Oct 02, 2007
#
# Author: Jaroslaw Zola <jaroslaw.zola@gmail.com>
# Copyright (c) 2008-2010 Jaroslaw Zola
# Distributed under the MIT License.
# See accompanying LICENSE.
# This file is part of x-build.
echo "X-build Jam wrapper, (c) 2007-2010 Jaroslaw Zola <jaroslaw.zola@gmail.com>"
# CHECK BUILDER
if [ -z "$JAM" ]; then
JMR=`which jam 2> /dev/null`
else
JMR=$JAM
fi
if [ -x "$JMR" ]; then
"$JMR" -v
else
echo "Error: Jam Make Redux missing!"
echo ""
echo "You can specify alternative location through JAM variable"
echo "You can obtain Jam from http://www.perforce.com/jam/jam.html"
echo "or from http://freetype.sourceforge.net/jam/"
exit
fi
# BUILD FILES DIR
BUILD=build
# GET OPTIONS
if [ -f "$BUILD/$1" ]; then
echo "Options from $BUILD/$1"
. "$BUILD/$1"
shift 1
else
if [ -f "$1" ]; then
echo "Options from $1"
. "$1"
shift 1
else
echo "Using default options"
. "$BUILD/default"
fi
fi
# BOOST HEADERS
. .boost
if [ -n "$BOOST_HDRS" ]; then
if [ -z "$CXX_HDRS" ]; then
CXX_HDRS=$BOOST_HDRS
else
CXX_HDRS="$CXX_HDRS $BOOST_HDRS"
fi
fi
# CUDA OPTIONS
. .cuda
if [ -n "$NVCC" ]; then
if [ -n "$CUDAFLAGS" ]; then
LINKFLAGS="$CUDAFLAGS $LINKFLAGS"
fi
if [ -n "$CUDALIBS" ]; then
LINKLIBS="$CUDALIBS $LINKLIBS"
fi
fi
# RUN BUILDER
ARG=$@
case "$@" in
*clean*)
;;
*install*)
;;
*)
ARG="$ARG install"
;;
esac
"$JMR" -q \
-sC++=$CXX \
-sCXX_OPTIM="$CXX_OPTIM" -sCXX_EXTRA="$CXX_EXTRA" -sCXX_HDRS="$CXX_HDRS" \
-sLINKFLAGS="$LINKFLAGS" -sLINKLIBS="$LINKLIBS" \
-sARPROG="$AR" \
-sNVCC=$NVCC -sNVCCFLAGS="$NVCCFLAGS" \
-sSUFFIX=$SUFFIX $ARG