New refactoring of build system for linux, should be clearer.

We also avoid building the w32 binary by default.
This commit is contained in:
Cas Cremers 2012-05-02 21:25:31 +02:00
parent f408e61b00
commit 2ba0de6abc
4 changed files with 46 additions and 22 deletions

View File

@ -12,8 +12,8 @@ then
else
if [ "$PLATFORM" = "Linux" ]
then
# Build both versions
./subbuild-unix-both.sh
# Build linux version
./subbuild-unix-unix.sh
else
echo "I don't know platform $PLATFORM, so I won't do anything"
fi

View File

@ -1,24 +1,7 @@
#!/bin/sh
# Default flags
CMFLAGS="-D CMAKE_BUILD_TYPE:STRING=Release"
# Make for windows and linux
cmake $CMFLAGS -D TARGETOS=Win32 . && make
cmake $CMFLAGS -D TARGETOS=Unix . && make
./subbuild-unix-unix.sh
./subbuild-unix-w32.sh
echo
echo
echo "---------------------------------------------------------"
echo "Built the Linux and Windows binaries"
# Copy to the correct locations
cp scyther-linux ../gui/Scyther/
cp scyther-w32.exe ../gui/Scyther/
# bonus...
cp scyther-linux ~/bin
echo Copied the files to their respective locations and \~/bin
echo "---------------------------------------------------------"
echo "Built both Linux and w32 versions."

22
src/subbuild-unix-unix.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/sh
# Default flags
CMFLAGS="-D CMAKE_BUILD_TYPE:STRING=Release"
# Make for linux
cmake $CMFLAGS -D TARGETOS=Unix . && make
echo
echo
echo "---------------------------------------------------------"
echo "Built the Linux binary"
# Copy to the correct location
cp scyther-linux ../gui/Scyther/
# bonus...
cp scyther-linux ~/bin
echo Copied the file to the gui/Scyther directory and \~/bin
echo "---------------------------------------------------------"

19
src/subbuild-unix-w32.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
# Default flags
CMFLAGS="-D CMAKE_BUILD_TYPE:STRING=Release"
# Make for windows and linux
cmake $CMFLAGS -D TARGETOS=Win32 . && make
echo
echo
echo "---------------------------------------------------------"
echo "Built the Windows binary"
# Copy to the correct location
cp scyther-w32.exe ../gui/Scyther/
echo Copied the file to the gui/Scyther directory
echo "---------------------------------------------------------"