From: chaoskagami Date: Sun, 24 Aug 2014 04:37:43 +0000 (-0400) Subject: Build script fixups. ;P X-Git-Tag: stable-2~15 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=cdbacb93a689bfa6bd22f25d947907ab93a5d361;p=vn%2Fvndc.git Build script fixups. ;P --- diff --git a/bin/SDL2.dll b/bin/SDL2.dll deleted file mode 100755 index a65b22c..0000000 Binary files a/bin/SDL2.dll and /dev/null differ diff --git a/bin/SDL2_image.dll b/bin/SDL2_image.dll deleted file mode 100755 index 9b27699..0000000 Binary files a/bin/SDL2_image.dll and /dev/null differ diff --git a/bin/SDL2_mixer.dll b/bin/SDL2_mixer.dll deleted file mode 100755 index 1c5e39b..0000000 Binary files a/bin/SDL2_mixer.dll and /dev/null differ diff --git a/bin/SDL2_ttf.dll b/bin/SDL2_ttf.dll deleted file mode 100755 index 25f535c..0000000 Binary files a/bin/SDL2_ttf.dll and /dev/null differ diff --git a/bin/libFLAC-8.dll b/bin/libFLAC-8.dll deleted file mode 100755 index fa85de7..0000000 Binary files a/bin/libFLAC-8.dll and /dev/null differ diff --git a/bin/libfreetype-6.dll b/bin/libfreetype-6.dll deleted file mode 100755 index 065a052..0000000 Binary files a/bin/libfreetype-6.dll and /dev/null differ diff --git a/bin/libjpeg-9.dll b/bin/libjpeg-9.dll deleted file mode 100755 index 5d1489c..0000000 Binary files a/bin/libjpeg-9.dll and /dev/null differ diff --git a/bin/libmikmod-2.dll b/bin/libmikmod-2.dll deleted file mode 100755 index e00a221..0000000 Binary files a/bin/libmikmod-2.dll and /dev/null differ diff --git a/bin/libmodplug-1.dll b/bin/libmodplug-1.dll deleted file mode 100755 index 785ce41..0000000 Binary files a/bin/libmodplug-1.dll and /dev/null differ diff --git a/bin/libogg-0.dll b/bin/libogg-0.dll deleted file mode 100755 index f6e02a1..0000000 Binary files a/bin/libogg-0.dll and /dev/null differ diff --git a/bin/libpng16-16.dll b/bin/libpng16-16.dll deleted file mode 100755 index a8f0ecc..0000000 Binary files a/bin/libpng16-16.dll and /dev/null differ diff --git a/bin/libtiff-5.dll b/bin/libtiff-5.dll deleted file mode 100755 index 71b12fd..0000000 Binary files a/bin/libtiff-5.dll and /dev/null differ diff --git a/bin/libvorbis-0.dll b/bin/libvorbis-0.dll deleted file mode 100755 index 73cc0ae..0000000 Binary files a/bin/libvorbis-0.dll and /dev/null differ diff --git a/bin/libvorbisfile-3.dll b/bin/libvorbisfile-3.dll deleted file mode 100755 index 1744f8c..0000000 Binary files a/bin/libvorbisfile-3.dll and /dev/null differ diff --git a/bin/libwebp-4.dll b/bin/libwebp-4.dll deleted file mode 100755 index 90a7989..0000000 Binary files a/bin/libwebp-4.dll and /dev/null differ diff --git a/bin/smpeg2.dll b/bin/smpeg2.dll deleted file mode 100755 index 1e7df3d..0000000 Binary files a/bin/smpeg2.dll and /dev/null differ diff --git a/bin/vndc.exe b/bin/vndc.exe deleted file mode 100755 index 300e262..0000000 Binary files a/bin/vndc.exe and /dev/null differ diff --git a/bin/zlib1.dll b/bin/zlib1.dll deleted file mode 100755 index 140b63c..0000000 Binary files a/bin/zlib1.dll and /dev/null differ diff --git a/build b/build index c3560a1..ad798fd 100755 --- a/build +++ b/build @@ -1,27 +1,22 @@ #!/bin/bash -ROOT=`pwd` -SRC=$ROOT/ -LIB=$ROOT/external/lib -BIN=$ROOT/bin +mkdir -p bin + +if [ "$1" == "mingw32" ]; then + buildscripts/build.mingw32 +elif [ "$1" == "mingw64" ]; then + buildscripts/build.mingw64 +elif [ "$1" == "linux" ]; then + buildscripts/build.generic +elif [ "$1" == "linux32" ]; then + buildscripts/build.x86_64-m32 +elif [ "$1" == "generic" ]; then + buildscripts/build.generic +elif [ "$1" == "clean" ]; then + rm -rf bin + echo "Removed bin directory." +else + echo "Targets: mingw32, mingw64, linux, linux32, generic" + echo "Operations: clean" +fi -mkdir $LIB -mkdir $BIN - -CXXFLAGS="-g -DGIT_REV=\"$(git rev-parse HEAD)\"" - -source mk - -INCLUDE="-I$ROOT/external/include/zero -I$ROOT/vndc/include" - -newtd - mkmcc external/src/zero - mkar libZero -deltd - -LDFLAGS=-lZero - -newtd - mkmcc vndc/src - mkld vndc -deltd diff --git a/build.m32 b/build.m32 deleted file mode 100755 index 66b558d..0000000 --- a/build.m32 +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -ROOT=`pwd` -SRC=$ROOT/ -LIB=$ROOT/external/lib -BIN=$ROOT/bin -CXXFLAGS="-m32" -LDFLAGS="-m32" -INCLUDE="-I$ROOT/external/include/zero -I$ROOT/vndc/include" - -source mk - -newtd - mkmcc external/src/zero - mkar libZero -deltd - -LDFLAGS=-lZero - -newtd - mkmcc vndc/src - mkld vndc.32 -deltd diff --git a/build.mingw b/build.mingw deleted file mode 100755 index e015d6b..0000000 --- a/build.mingw +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -ROOT=`pwd` -SRC=$ROOT/ -LIB=$ROOT/external/lib -BIN=$ROOT/bin -CXXFLAGS="-static -static-libgcc -static-libstdc++" -source mk -CXX="x86_64-w64-mingw32-g++" - -INCLUDE="-I$ROOT/external/include/zero -I$ROOT/vndc/include" - -newtd - mkmcc external/src/zero - mkar libZero.w64 -deltd - -LDFLAGS=-lZero - -newtd - mkmcc vndc/src - mkld vndc64.exe -deltd diff --git a/buildscripts/build.generic b/buildscripts/build.generic new file mode 100755 index 0000000..5f636a0 --- /dev/null +++ b/buildscripts/build.generic @@ -0,0 +1,24 @@ +#!/bin/bash + +## +## Use this build script to build on +## a unix system for the current unix +## system. Linux, freebsd, openbsd, etc. +## + +ROOT=`pwd` +SRC=$ROOT/ +LIB=$ROOT/external/lib +BIN=$ROOT/bin + +CXXFLAGS="-DGIT_REV=\"$(git rev-parse HEAD)\"" + +source buildscripts/mk + +INCLUDE="-I$ROOT/external/include/zero -I$ROOT/vndc/include" + +newtd + mkmcc external/src/zero + mkmcc vndc/src + mkld vndc.`uname -m` +deltd diff --git a/buildscripts/build.mingw32 b/buildscripts/build.mingw32 new file mode 100755 index 0000000..88f1317 --- /dev/null +++ b/buildscripts/build.mingw32 @@ -0,0 +1,35 @@ +#!/bin/bash + +## +## Use this to build a 32bit windows binary. +## At the moment, I haven't quite figured out static +## linking yet. +## + + +ROOT=`pwd` +SRC=$ROOT/ +LIB=$ROOT/external/lib/ +BIN=$ROOT/bin + +CXXFLAGS="-I$ROOT/external/deps/i686-w64-mingw32/include -DGIT_REV=\"$(git rev-parse HEAD)\"" + +source buildscripts/mk + +LDFLAGS="-L$ROOT/external/deps/i686-w64-mingw32/lib -lmingw32 -lSDL2main -lSDL2 -lSDL2_mixer -lSDL2_image -lSDL2_ttf -Dmain=SDL_main -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static-libgcc -static-libstdc++" + +CXX=i686-w64-mingw32-g++ +LD=i686-w64-mingw32-g++ + +# On windows ar doesn't really work + +INCLUDE="-I$ROOT/external/include/zero -I$ROOT/vndc/include" + +newtd + mkmcc external/src/zero + mkmcc vndc/src + mkld vndc.exe +deltd + +# Windows static link is being derpy. +cp external/deps/i686-w64-mingw32/bin/*.dll bin/ diff --git a/build.mingw64 b/buildscripts/build.mingw64 similarity index 84% rename from build.mingw64 rename to buildscripts/build.mingw64 index 8d81af6..f1cd65e 100755 --- a/build.mingw64 +++ b/buildscripts/build.mingw64 @@ -1,13 +1,19 @@ #!/bin/bash +## +## Use this to build a 64bit windows binary. +## At the moment, I haven't quite figured out static +## linking yet. +## + + ROOT=`pwd` SRC=$ROOT/ -LIB=$ROOT/external/lib/ BIN=$ROOT/bin CXXFLAGS="-I$ROOT/external/deps/x86_64-w64-mingw32/include -DGIT_REV=\"$(git rev-parse HEAD)\"" -source mk +source buildscripts/mk LDFLAGS="-L$ROOT/external/deps/x86_64-w64-mingw32/lib -lmingw32 -lSDL2main -lSDL2 -lSDL2_mixer -lSDL2_image -lSDL2_ttf -Dmain=SDL_main -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static-libgcc -static-libstdc++" diff --git a/buildscripts/build.x86_64-m32 b/buildscripts/build.x86_64-m32 new file mode 100755 index 0000000..b50da03 --- /dev/null +++ b/buildscripts/build.x86_64-m32 @@ -0,0 +1,28 @@ +#!/bin/bash + +## +## Use this on a linux 64-bit system (or any +## system that provides -m32 for 32bit) to +## build using gcc multilib features +## + +if [ "`uname -m`" != "x86_64" ]; then + echo "You aren't running a multilib gcc. I quit." + exit 1 +fi + +ROOT=`pwd` +SRC=$ROOT/ +LIB=$ROOT/external/lib +BIN=$ROOT/bin +CXXFLAGS="-m32 -DGIT_REV=\"$(git rev-parse HEAD)\"" +LDFLAGS="-m32" +INCLUDE="-I$ROOT/external/include/zero -I$ROOT/vndc/include" + +source buildscripts/mk + +newtd + mkmcc external/src/zero + mkmcc vndc/src + mkld vndc.x86 +deltd diff --git a/mk b/buildscripts/mk similarity index 100% rename from mk rename to buildscripts/mk diff --git a/external/lib/libZero.a b/external/lib/libZero.a deleted file mode 100644 index 9e6df79..0000000 Binary files a/external/lib/libZero.a and /dev/null differ