Repository navigation
Expand file tree
/
Copy pathbuildNative.sh
More file actions
executable file
·76 lines (64 loc) · 1.63 KB
/
Copy pathbuildNative.sh
File metadata and controls
executable file
·76 lines (64 loc) · 1.63 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
#!/bin/bash
###############################################################################
#
# Copyright IBM Corp. 2023, 2026
#
# This code is free software; you can redistribute it and/or modify it
# under the terms provided by IBM in the LICENSE file that accompanied
# this code, including the "Classpath" Exception described therein.
###############################################################################
set -o xtrace
PLATFORMS=(arm-linux64 ppc-aix64 ppcle-linux64 s390-linux64 s390-zos64 x86-linux64)
if [ -z "$JAVA_HOME" ];
then
echo "Error: JAVA_HOME is not defined or is empty";
exit;
fi
if [ -z "$GSKIT_HOME" ];
then
echo "Error: GSKIT_HOME is not defined or is empty";
exit;
fi
if [ -z "$OPENSSL_HOME" ];
then
if [ ${PLATFORM} != "s390-zos64" ];
then
echo "Error: OPENSSL_HOME is not defined or is empty";
exit;
fi
echo "Warning: OPENSSL_HOME is not defined or is empty; skipping OpenSSL native build";
fi
if [ -z "$PLATFORM" ];
then
echo "Error: PLATFORM is not defined or is empty";
echo "PLATFORM should be one the following:"
echo ${PLATFORMS[*]}
exit;
fi
PLATFORM_FOUND=0
for plat in ${PLATFORMS[@]}; do
if [ ${plat} == ${PLATFORM} ];
then
PLATFORM_FOUND=1
fi
done
if [ ${PLATFORM_FOUND} -eq 0 ];
then
echo "PLATFORM ${PLATFORM} is not accepted. PLATFORM should be one the following:"
echo ${PLATFORMS[*]}
exit;
fi
make=make
if [ ${PLATFORM} == "ppc-aix64" ];
then
make=gmake
fi
cd src/main/native/ock
${make} -f jgskit.mak clean
${make} -f jgskit.mak
if [ -n "$OPENSSL_HOME" ];
then
cd ../openssl
make -f openjceplus.mak clean
make -f openjceplus.mak
fi