buildAndRun.sh 721 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. # Load arguments into named variables in order
  3. PROJECT_FOLDER=$1 # Where your code is
  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. MODE=$6 # Use -DDEBUG for debug mode or -DNDEBUG for release mode
  9. CPP_VERSION=$7 # Default is -std=c++14
  10. O_LEVEL=$8 # Default is -O2
  11. LINKER_FLAGS=$9 # Additional linker flags for libraries and such
  12. # Allow calling the build script
  13. chmod +x ${ROOT_PATH}/tools/build.sh
  14. # Compile and link
  15. ${ROOT_PATH}/tools/build.sh $1 $2 $3 $4 $5 $6 $7 $8 $9
  16. echo "Starting application at ${TARGET_FILE}"
  17. ${TARGET_FILE}