diff --git a/demo/build.sh b/demo/build.sh index e3e2b4e..445f341 100755 --- a/demo/build.sh +++ b/demo/build.sh @@ -1,14 +1,15 @@ -#!/bin/bash +#!/bin/sh OS_NAME=`uname -o 2>/dev/null || uname -s` -if [ $OS_NAME == "Msys" ]; then - GLFLAG="-lopengl32" -elif [ $OS_NAME == "Darwin" ]; then - GLFLAG="-framework OpenGL" -else - GLFLAG="-lGL" -fi +case "$OS_NAME" in +Msys) + GLFLAG="-lopengl32";; +Darwin) + GLFLAG="-framework OpenGL";; +*) + GLFLAG="-lGL";; +esac CFLAGS="-I../src -Wall -std=c11 -pedantic `sdl2-config --libs` $GLFLAG -lm -O3 -g"