New refactoring of build system for linux, should be clearer.
We also avoid building the w32 binary by default.
This commit is contained in:
parent
f408e61b00
commit
2ba0de6abc
@ -12,8 +12,8 @@ then
|
|||||||
else
|
else
|
||||||
if [ "$PLATFORM" = "Linux" ]
|
if [ "$PLATFORM" = "Linux" ]
|
||||||
then
|
then
|
||||||
# Build both versions
|
# Build linux version
|
||||||
./subbuild-unix-both.sh
|
./subbuild-unix-unix.sh
|
||||||
else
|
else
|
||||||
echo "I don't know platform $PLATFORM, so I won't do anything"
|
echo "I don't know platform $PLATFORM, so I won't do anything"
|
||||||
fi
|
fi
|
||||||
|
@ -1,24 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Default flags
|
./subbuild-unix-unix.sh
|
||||||
CMFLAGS="-D CMAKE_BUILD_TYPE:STRING=Release"
|
./subbuild-unix-w32.sh
|
||||||
|
|
||||||
# Make for windows and linux
|
|
||||||
cmake $CMFLAGS -D TARGETOS=Win32 . && make
|
|
||||||
cmake $CMFLAGS -D TARGETOS=Unix . && make
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo "Built both Linux and w32 versions."
|
||||||
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 "---------------------------------------------------------"
|
|
||||||
|
|
||||||
|
22
src/subbuild-unix-unix.sh
Executable file
22
src/subbuild-unix-unix.sh
Executable 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
19
src/subbuild-unix-w32.sh
Executable 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 "---------------------------------------------------------"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user