Skip to content

Commit 88385ba

Browse files
MeFisto94riccardobl
authored andcommitted
Build Bullet for Linux ARM (Raspberry Pi)
1 parent b1db497 commit 88385ba

File tree

2 files changed

+56
-10
lines changed

2 files changed

+56
-10
lines changed

.travis.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,26 @@ branches:
66
- /^v3.3.*$/
77
- v3.2
88
- /^v3.2.*$/
9+
- feature/bullet-arm
910

1011
matrix:
1112
include:
1213
- os: linux
13-
dist: trusty
1414
jdk: oraclejdk8
15+
dist: precise
1516
env: UPLOAD=true
1617
- os: linux
1718
jdk: openjdk11
18-
dist: xenial
19-
- os: linux
20-
dist: xenial
21-
jdk: openjdk8
22-
env: UPLOAD_NATIVE=true
19+
dist: bionic
20+
env: UPLOAD=true UPLOAD_NATIVE=true
21+
sudo: true
22+
addons:
23+
apt:
24+
packages:
25+
- gcc-multilib
26+
- g++-multilib
27+
before_install:
28+
- sudo apt update && sudo apt install -fy gcc-7-arm-linux-gnueabihf gcc-7-arm-linux-gnueabi gcc-8-aarch64-linux-gnu g++-7-arm-linux-gnueabihf g++-7-arm-linux-gnueabi g++-8-aarch64-linux-gnu
2329
- os: osx
2430
osx_image: xcode9.3
2531
env: UPLOAD_NATIVE=true
@@ -42,10 +48,6 @@ addons:
4248
hosts:
4349
- travisci
4450
hostname: travisci
45-
apt:
46-
packages:
47-
- gcc-multilib
48-
- g++-multilib
4951

5052
before_install:
5153
- '[ -n "$UPLOAD" ] && git fetch --unshallow || :'

jme3-bullet-native/build.gradle

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ model {
3535
targetPlatform 'Mac32'
3636
targetPlatform 'Linux64'
3737
targetPlatform 'Linux32'
38+
targetPlatform 'LinuxArm'
39+
targetPlatform 'LinuxArmHF'
40+
targetPlatform 'LinuxArm64'
3841

3942
sources {
4043
cpp {
@@ -62,6 +65,35 @@ model {
6265
}
6366
}
6467
}
68+
69+
toolChains {
70+
gccArm(Gcc) {
71+
// Fun Fact: Gradle uses gcc as linker frontend, so we don't specify ld directly here
72+
target("LinuxArm"){
73+
path "/usr/bin"
74+
cCompiler.executable = "arm-linux-gnueabi-gcc-7"
75+
cppCompiler.executable = "arm-linux-gnueabi-g++-7"
76+
linker.executable = "arm-linux-gnueabi-gcc-7"
77+
assembler.executable = "arm-linux-gnueabi-as"
78+
}
79+
80+
target("LinuxArmHF"){
81+
path "/usr/bin"
82+
cCompiler.executable = "arm-linux-gnueabihf-gcc-7"
83+
cppCompiler.executable = "arm-linux-gnueabihf-g++-7"
84+
linker.executable = "arm-linux-gnueabihf-gcc-7"
85+
assembler.executable = "arm-linux-gnueabihf-as"
86+
}
87+
88+
target("LinuxArm64"){
89+
path "/usr/bin"
90+
cCompiler.executable = "aarch64-linux-gnu-gcc-8"
91+
cppCompiler.executable = "aarch64-linux-gnu-g++-8"
92+
linker.executable = "aarch64-linux-gnu-gcc-8"
93+
assembler.executable = "aarch64-linux-gnu-as"
94+
}
95+
}
96+
}
6597

6698
binaries {
6799
withType(SharedLibraryBinarySpec) {
@@ -188,6 +220,18 @@ model {
188220
architecture "x86_64"
189221
operatingSystem "linux"
190222
}
223+
LinuxArm {
224+
architecture "arm"
225+
operatingSystem "linux"
226+
}
227+
LinuxArmHF {
228+
architecture "armhf"
229+
operatingSystem "linux"
230+
}
231+
LinuxArm64 {
232+
architecture "aarch64"
233+
operatingSystem "linux"
234+
}
191235
}
192236
}
193237

0 commit comments

Comments
 (0)