From 2ba0de6abce797e3256eca0b3bd9c6f65cbb3ec8 Mon Sep 17 00:00:00 2001 From: Cas Cremers Date: Wed, 2 May 2012 21:25:31 +0200 Subject: [PATCH] New refactoring of build system for linux, should be clearer. We also avoid building the w32 binary by default. --- src/build.sh | 4 ++-- src/subbuild-unix-both.sh | 23 +++-------------------- src/subbuild-unix-unix.sh | 22 ++++++++++++++++++++++ src/subbuild-unix-w32.sh | 19 +++++++++++++++++++ 4 files changed, 46 insertions(+), 22 deletions(-) create mode 100755 src/subbuild-unix-unix.sh create mode 100755 src/subbuild-unix-w32.sh diff --git a/src/build.sh b/src/build.sh index 77d6981..07467b4 100755 --- a/src/build.sh +++ b/src/build.sh @@ -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 diff --git a/src/subbuild-unix-both.sh b/src/subbuild-unix-both.sh index 19b0674..0d1b458 100755 --- a/src/subbuild-unix-both.sh +++ b/src/subbuild-unix-both.sh @@ -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." diff --git a/src/subbuild-unix-unix.sh b/src/subbuild-unix-unix.sh new file mode 100755 index 0000000..4d8e2ee --- /dev/null +++ b/src/subbuild-unix-unix.sh @@ -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 "---------------------------------------------------------" + diff --git a/src/subbuild-unix-w32.sh b/src/subbuild-unix-w32.sh new file mode 100755 index 0000000..703d023 --- /dev/null +++ b/src/subbuild-unix-w32.sh @@ -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 "---------------------------------------------------------" +