buildAndRun.sh 770 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. # Load arguments into named variables in order
  3. PROJECT_FOLDERS=$1 # Where your code is as a space separated list of folders in a quote
  4. TARGET_FILE=$2 # Your executable to build
  5. ROOT_PATH=$3 # The parent folder of DFPSR, SDK and tools
  6. TEMP_ROOT=$4 # Where your temporary objects should be
  7. WINDOW_MANAGER=$5 # Which library to use for creating a window
  8. COMPILER_FLAGS=$6 # -DDEBUG/-DNDEBUG -std=c++14/-std=c++17 -O2/-O3
  9. LINKER_FLAGS=$7 # Additional linker flags for libraries and such
  10. # Allow calling the build script
  11. chmod +x ${ROOT_PATH}/tools/buildScripts/build.sh
  12. # Compile and link
  13. ${ROOT_PATH}/tools/buildScripts/build.sh "$1" "$2" "$3" "$4" "$5" "$6" "$7"
  14. if [ $? -ne 0 ]
  15. then
  16. exit 1
  17. fi
  18. echo "Starting application at ${TARGET_FILE}"
  19. ${TARGET_FILE}