build.sh 998 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. # Assuming that you called build.sh from its own folder, you should already be in the project folder.
  3. PROJECT_FOLDER=.
  4. # Placing your executable in the project folder allow using the same relative paths in the final release.
  5. TARGET_FILE=./sandbox
  6. # The root folder is where DFPSR, SDK and tools are located.
  7. ROOT_PATH=../..
  8. # Select where to place temporary files and the generated executable
  9. TEMP_DIR=${ROOT_PATH}/../../temporary
  10. # Select a window manager
  11. WINDOW_MANAGER=X11
  12. # Select safe debug mode or fast release mode
  13. #MODE=-DDEBUG #Debug mode
  14. MODE=-DNDEBUG #Release mode
  15. # Select the version of C++
  16. CPP_VERSION=-std=c++14
  17. # Select optimization level
  18. O_LEVEL=-O2
  19. # Select external libraries
  20. LINKER_FLAGS=""
  21. # Give execution permission
  22. chmod +x ${ROOT_PATH}/tools/buildAndRun.sh;
  23. # Compile everything
  24. ${ROOT_PATH}/tools/buildAndRun.sh "${PROJECT_FOLDER}" "${TARGET_FILE}" "${ROOT_PATH}" "${TEMP_DIR}" "${WINDOW_MANAGER}" "${MODE}" "${CPP_VERSION}" "${O_LEVEL}" "${LINKER_FLAGS}";