summaryrefslogtreecommitdiff
path: root/bindings/objc/build_sword/build_ub_mac_swordutils.sh
blob: 55c21f7801ac7813b0b81d8aecd7aedd52dfd82a (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
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
#!/bin/sh -e
# script by Manfred Bergmann in 2006
#

# dependencies for this script are:
# that "build_mac_sword.sh" has been executed in "fat" mode and
# successfully created a "build_tools" folder with directories: "ppc_inst" and "intel_inst"

# first build library
./build_mac_sword.sh -a fat -b build_tools

BDIR=.
SWORDBUILD=$BDIR/build_tools
PPCPREFIX=$SWORDBUILD/ppc_inst
INTELPREFIX=$SWORDBUILD/intel_inst
RESULTPREFIX=$SWORDBUILD/result_inst

# Create install dirs if they doesn't exist
if [ ! -d $SWORDBUILD ]; then
    echo "build folder doesn't exist!\n"
    exit 1
fi
if [ ! -d $PPCPREFIX ]; then
    echo "ppc installation folder doesn't exist!\n"
    exit 1
fi
if [ ! -d $INTELPREFIX ]; then
    echo "intel installation folder doesn't exist!\n"
    exit 1
fi
if [ ! -d $RESULTPREFIX ]; then
    echo "result(fat) installation folder doesn't exist!\n"
    exit 1
fi

BINDESTINATION=$RESULTPREFIX/bin
if [ -d $BINDESTINATION ]; then
    rm -r $BINDESTINATION
fi
mkdir $BINDESTINATION

function callLipo {
    lipo -create $INTELPREFIX/bin/$1 $PPCPREFIX/bin/$1 -output $BINDESTINATION/$1    
}

callLipo imp2gbs
callLipo imp2ld
callLipo imp2vs
callLipo installmgr
callLipo mod2imp
callLipo mod2osis
callLipo mod2vpl
callLipo mod2zmod
callLipo osis2mod
callLipo tei2mod
callLipo vpl2mod
callLipo vs2osisref
callLipo vs2osisreftxt
callLipo xml2gbs