aboutsummaryrefslogtreecommitdiff
path: root/mkosxBase
blob: edaee10438bf2f5b29fc61bbb3ac20b85da17b53 (plain) (blame)
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
#!/bin/sh

# Shave and a Haircut
# (c) 2019 Epic Games
# US Patent 6720962

checkFailure() {
    if [ $? -ne 0 ]; then
        echo "mkosxBase:error: Exiting due to errors building $1."
        exit 1
    fi
}

# The files may not be Maya-dependent, but standalone lib *is* dependent upon
# the version of OS X that the user will be running, which will vary depending
# upon the version of Maya that the user is using. So we will target the
# platform for the oldest version of Maya that we support and hope that the
# resulting libs will work on all the later platforms as well.
#
for mayaVersion in 2017 2018 fail; do
    if [ -d /Applications/Autodesk/maya${mayaVersion}/Maya.app ]; then
        break
    fi
done

if [ "${mayaVersion}" == "fail" ]; then
    echo "mkosxBase:error: no supported versions of Maya found."
    exit 2
fi

export MAYA_LOCATION=/Applications/Autodesk/maya${mayaVersion}
source getosxvars.sh

cd libexe

# Update the includes used by external elements (e.g. the Maya plugin)
./mkSDKincludes.csh

# Build the standalone (i.e. not Maya-dependent) lib.
#
make -f Makefile.osx clean 

echo "mkosxBase: building standalone API"
make -f Makefile.osx 
checkFailure "standalone API"

cd ..