diff --git a/Makefile b/Makefile index 91010a620..ec848192a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -all: debug +all: default demo: ./odin run examples/demo/demo.odin -file @@ -6,12 +6,18 @@ demo: report: ./odin report +default: + PROGRAM=make ./build_odin.sh # debug + debug: ./build_odin.sh debug release: ./build_odin.sh release +release-native: + ./build_odin.sh release-native + release_native: ./build_odin.sh release-native diff --git a/build_odin.sh b/build_odin.sh index 066f48c20..8e35d7291 100755 --- a/build_odin.sh +++ b/build_odin.sh @@ -144,12 +144,17 @@ build_odin() { } run_demo() { - ./odin run examples/demo -vet -strict-style -- Hellope World + if [ $# -eq 0 ] || [ "$1" = "debug" ]; then + ./odin run examples/demo -vet -strict-style -- Hellope World + fi } if [ $# -eq 0 ]; then build_odin debug run_demo + + : ${PROGRAM:=$0} + echo "\nDebug compiler built. Note: run \"$PROGRAM release\" or \"$PROGRAM release-native\" if you want a faster, release mode compiler." elif [ $# -eq 1 ]; then case $1 in report)