From: z411 Date: Wed, 29 Dec 2021 05:59:08 +0000 (+0000) Subject: Adding libd0 cross-compile script X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f4c4a677eb4c455ed9aafaf67082e2e3a651bf5c;p=xonotic%2Fxonotic.wiki.git Adding libd0 cross-compile script --- diff --git a/Shared-libraries-(buildfiles).md b/Shared-libraries-(buildfiles).md index 1451f4c..5605358 100644 --- a/Shared-libraries-(buildfiles).md +++ b/Shared-libraries-(buildfiles).md @@ -259,13 +259,6 @@ cp out/bin/libtheora-0.dll ~/Games/xonotic/misc/buildfiles/win64/libtheora-0.dll ### macOS Darkplaces loads `libtheora.dylib` -# libd0_blind_id-0 & libd0_rijndael-0 -Internal project, see https://gitlab.com/xonotic/d0_blind_id - -### Linux - -`LDFLAGS='-L$HOME/Games/xonotic/misc/builddeps/linux64/gmp/lib' CPPFLAGS='-I$HOME/Games/xonotic/misc/builddeps/linux64/gmp/include' ./configure --prefix=$HOME/Games/xonotic/misc/builddeps/linux64/d0_blind_id --enable-static --disable-shared --with-pic` - # libgmp A dependency of libd0_blind_id-0 @@ -300,6 +293,42 @@ cd "$d0" cp out/bin/libgmp-10.dll ~/Games/xonotic/misc/buildfiles/win64/libgmp-10.dll ``` +# libd0_blind_id-0 & libd0_rijndael-0 +Internal project, see https://gitlab.com/xonotic/d0_blind_id + +### Linux + +`LDFLAGS='-L$HOME/Games/xonotic/misc/builddeps/linux64/gmp/lib' CPPFLAGS='-I$HOME/Games/xonotic/misc/builddeps/linux64/gmp/include' ./configure --prefix=$HOME/Games/xonotic/misc/builddeps/linux64/d0_blind_id --enable-static --disable-shared --with-pic` + +### Windows +Cross-compiling (requires libgmp): + +``` +d0=$(pwd) +GMP_ROOT="$d0/../gmp/out" +export LDFLAGS="-L$GMP_ROOT/lib" +export CPPFLAGS="-I$GMP_ROOT/include" + +git clone https://gitlab.com/xonotic/d0_blind_id.git + +cd d0_blind_id +./autogen.sh +sed -i '/libd0_blind_id_la_LDFLAGS/ s/$/ -no-undefined/' Makefile.am +sed -i '/libd0_rijndael_la_LDFLAGS/ s/$/ -no-undefined/' Makefile.am + +cd "$d0" +mkdir build +mkdir out +cd build +"$d0/d0_blind_id/configure" --with-pic --prefix="$d0/out" --host=x86_64-w64-mingw32 +make +make install + +cd "$d0" +cp out/bin/libd0_blind_id-0.dll ~/Games/xonotic/misc/buildfiles/win64/libd0_blind_id-0.dll +cp out/bin/libd0_rijndael-0.dll ~/Games/xonotic/misc/buildfiles/win64/libd0_rijndael-0.dll +``` + # libode Is not loaded under Windows and crashes the game if it is and a map is loaded up. Also it is not statically linked and thus requires libstdc++-6.dll and libgcc_s_sjlj-1.dll.