Browse Source

Updating osmia

master
dirkson 3 years ago
parent
commit
17753edc6a
  1. 19
      build

19
build

@ -5,7 +5,6 @@
#************
#If CC isn't set, the script will attempt to figure it out itself.
#If you change the compiler, you'll need to clean your build.
#CC=musl-gcc
#If this isn't set, the script will attempt to find ninja and samu, in that order.
@ -65,8 +64,8 @@ osmia_help () {
echo "-d OR --debug : Builds using Meson's debug mode, with --werror added"
echo "-c OR --clean : Cleans up current project meson/ninja/osmia files"
echo "-a OR --add-san : Clang's address sanitizer"
echo "-w32 OR --win32 : Cross-compile for win32 using subprojects/win32cross.txt"
echo "-w OR --win : cross-compile for win64 using subprojects/win64cross.txt"
echo "-w32 OR --win32 : Cross-compile for win32 using $MDIR/win32.txt"
echo "-w OR --win : cross-compile for win64 using $MDIR/win64.txt"
echo "-o OR --osx : cross-compile for OSX"
}
osmia_clean () {
@ -106,8 +105,7 @@ if [ -e "$MDIR/osmia/clean" ]; then
rm $MDIR/osmia/clean
fi
#clear
clear
err=0;
@ -134,12 +132,12 @@ case "$1" in
-w32|-win32|--win32|-window32|--windows32)
DIR=release
BLD=release
MESONOPTS="--cross-file win32cross.txt"
MESONOPTS="--cross-file $MDIR/win32.txt"
;;
-w|-win|--win|--window|--windows|-w64|-win64|--win64|--windows64|--windows64)
DIR=release
BLD=release
MESONOPTS="--cross-file win64cross.txt"
MESONOPTS="--cross-file $MDIR/win64.txt"
;;
-c|-clean|--clean)
if [ "$#" -ne 1 ]; then
@ -220,8 +218,9 @@ fi
#Check if our CC changed. If it did, clean
if [ -e "$MDIR/osmia/cc" ]; then
if [ "$CC" = $(cat $MDIR/osmia/cc) ]; then
echo "S"
if [ "$CC" != $(cat $MDIR/osmia/cc) ]; then
echo "osmia: compiler changed. Forced to clean."
osmia_clean
fi
fi
@ -236,6 +235,7 @@ fi
mkdir -p $MDIR/osmia/ 2> /dev/null
if [ ! -d "$MDIR/$DIR" ]; then
echo $CC > $MDIR/osmia/cc
export CC="$CACHE $CC"
#Run meson if required
mkdir $MDIR/$DIR
@ -247,7 +247,6 @@ if [ ! -d "$MDIR/$DIR" ]; then
echo "osmia: meson returned an error. Please check $MDIR/$DIR/meson-logs/meson-log.txt for more info."
exit 1
fi
echo $CC > $MDIR/osmia/cc
#else
#May wish to look into this in the future
#meson configure $MESONOPTS

Loading…
Cancel
Save