mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 18:15:28 -04:00
Fix some plugins not building for windows, also build plugins for raspberry pi
This commit is contained in:
parent
a13ddad39d
commit
e15aa886e0
@ -24,8 +24,8 @@
|
||||
# paths, change these as needed
|
||||
SOURCE_DIR=~/client
|
||||
WEB_CC=~/emscripten/emsdk/emscripten/tag-1.38.30/emcc
|
||||
MAC32_CC=/usr/bin/clang/osx32
|
||||
MAC64_CC=/usr/bin/clang/osx64
|
||||
MAC32_CC=~/osx/target/bin/o32-clang
|
||||
MAC64_CC=~/osx/target/bin/o64-clang
|
||||
WIN32_CC=i686-w64-mingw32-gcc
|
||||
WIN64_CC=x86_64-w64-mingw32-gcc
|
||||
|
||||
|
@ -7,36 +7,51 @@ FLAGS="-shared -fPIC -O1 -s -std=c99"
|
||||
|
||||
NIX32_PATH="gcc -m32"
|
||||
NIX64_PATH="gcc -m64"
|
||||
MAC32_PATH="/home/buildbot/osx/target/bin/o32-clang"
|
||||
MAC64_PATH="/home/buildbot/osx/target/bin/o64-clang"
|
||||
WIN32_PATH="i686-w64-mingw32-gcc"
|
||||
WIN64_PATH="x86_64-w64-mingw32-gcc"
|
||||
MAC32_PATH=~/osx/target/bin/o32-clang
|
||||
MAC64_PATH=~/osx/target/bin/o64-clang
|
||||
WIN32_PATH=i686-w64-mingw32-gcc
|
||||
WIN64_PATH=x86_64-w64-mingw32-gcc
|
||||
RPI_PATH=~/rpi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc-4.8.3
|
||||
|
||||
echo $FILES
|
||||
echo $INCLUDE_DIRS
|
||||
|
||||
echo "Compiling nix64"
|
||||
$NIX64_PATH $FILES -I ~/client/src/ -I ./src/ -o ${PLUGIN}_nix64.so $FLAGS -nostartfiles -Wl,--entry=0
|
||||
NIX_FLAGS="-nostartfiles -Wl,--entry=0"
|
||||
MAC_FLAGS="-undefined dynamic_lookup"
|
||||
# TODO: Figure out why we sometimes need this with mingw
|
||||
# If we don't include nostart files for some plugins, get a
|
||||
# ertr000001.o:(.rdata+0x0): undefined reference to `_pei386_runtime_relocator'
|
||||
# Seems to happen if you use exported variables from the game
|
||||
if [ -z "$LITE_MODE" ]; then
|
||||
WIN_FLAGS=""
|
||||
else
|
||||
WIN_FLAGS="-nostartfiles -Wl,--entry=0"
|
||||
fi
|
||||
|
||||
echo "Compiling nix32"
|
||||
$NIX32_PATH $FILES -I ~/client/src/ -I ./src/ -o ${PLUGIN}_nix32.so $FLAGS -nostartfiles -Wl,--entry=0
|
||||
$NIX32_PATH $FILES -I ~/client/src/ -I ./src/ -o ${PLUGIN}_nix32.so $FLAGS $NIX_FLAGS
|
||||
|
||||
echo "Compiling mac64"
|
||||
$MAC64_PATH $FILES -I ~/client/src/ -I ./src/ -o ${PLUGIN}_osx64.so $FLAGS -undefined dynamic_lookup
|
||||
echo "Compiling nix64"
|
||||
$NIX64_PATH $FILES -I ~/client/src/ -I ./src/ -o ${PLUGIN}_nix64.so $FLAGS $NIX_FLAGS
|
||||
|
||||
echo "Compiling mac32"
|
||||
$MAC32_PATH $FILES -I ~/client/src/ -I ./src/ -o ${PLUGIN}_osx32.so $FLAGS -undefined dynamic_lookup
|
||||
$MAC32_PATH $FILES -I ~/client/src/ -I ./src/ -o ${PLUGIN}_osx32.so $FLAGS $MAC_FLAGS
|
||||
|
||||
echo "Compiling mac64"
|
||||
$MAC64_PATH $FILES -I ~/client/src/ -I ./src/ -o ${PLUGIN}_osx64.so $FLAGS $MAC_FLAGS
|
||||
|
||||
echo "Compiling win32"
|
||||
rm ClassiCube.exe ClassiCube.def
|
||||
cp ~/client/src/cc-w32-d3d.exe ClassiCube.exe
|
||||
gendef ClassiCube.exe
|
||||
i686-w64-mingw32-dlltool -d ClassiCube.def -l libClassiCube.a -D ClassiCube.exe
|
||||
$WIN32_PATH $FILES -I ~/client/src/ -I ./src/ -o ${PLUGIN}_win32.dll -nostartfiles -Wl,--entry=0 $FLAGS -L . -lClassiCube
|
||||
$WIN32_PATH $FILES -I ~/client/src/ -I ./src/ -o ${PLUGIN}_win32.dll $FLAGS $WIN_FLAGS -L . -lClassiCube
|
||||
|
||||
echo "Compiling win64"
|
||||
rm ClassiCube.exe ClassiCube.def
|
||||
cp ~/client/src/cc-w64-d3d.exe ClassiCube.exe
|
||||
gendef ClassiCube.exe
|
||||
x86_64-w64-mingw32-dlltool -d ClassiCube.def -l libClassiCube.a -D ClassiCube.exe
|
||||
$WIN64_PATH $FILES -I ~/client/src/ -I ./src/ -o ${PLUGIN}_win64.dll -nostartfiles -Wl,--entry=0 $FLAGS -L . -lClassiCube
|
||||
$WIN64_PATH $FILES -I ~/client/src/ -I ./src/ -o ${PLUGIN}_win64.dll $FLAGS $WIN_FLAGS -L . -lClassiCube
|
||||
|
||||
echo "Compiling rpi"
|
||||
$RPI_PATH $FILES -I ~/client/src/ -I ./src/ -o ${PLUGIN}_rpi.so $FLAGS -nostartfiles -Wl,--entry=0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user