Cross-Platform build scripts for audio plugins
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.6KB

  1. #!/bin/bash
  2. PAWPAW_ROOT="${PWD}"
  3. SOURCING_FILES=1
  4. target="${1}"
  5. # ---------------------------------------------------------------------------------------------------------------------
  6. # missing target
  7. if [ -z "${target}" ]; then
  8. echo "usage: source local.env <target>"
  9. # ---------------------------------------------------------------------------------------------------------------------
  10. # contains target
  11. elif [ -e setup/check_target.sh ]; then
  12. source setup/check_target.sh
  13. # ---------------------------------------------------------------------------------------------------------------------
  14. # export vars if valid target
  15. if [ "${INVALID_TARGET}" -eq 0 ]; then
  16. source setup/env.sh
  17. export AR="${TARGET_AR}"
  18. export CC="${TARGET_CC}"
  19. export CXX="${TARGET_CXX}"
  20. export LD="${TARGET_LD}"
  21. export STRIP="${TARGET_STRIP}"
  22. export WINDRES="${TARGET_WINDRES}"
  23. export CFLAGS="${TARGET_CFLAGS} ${EXTRA_CFLAGS}"
  24. export CXXFLAGS="${TARGET_CXXFLAGS} ${EXTRA_CXXFLAGS}"
  25. export LDFLAGS="${TARGET_LDFLAGS} ${EXTRA_LDFLAGS}"
  26. export PKG_CONFIG_PATH="${TARGET_PKG_CONFIG_PATH}"
  27. unset CPPFLAGS
  28. export OLD_PATH="${PATH}"
  29. export PATH="${TARGET_PATH}"
  30. alias ar=${AR}
  31. alias cc=${CC}
  32. alias cpp=${CPP}
  33. alias gcc=${CC}
  34. alias g++=${CXX}
  35. alias ld=${ld}
  36. alias strip=${strip}
  37. echo "Success! Environment is now ready to build stuff"
  38. fi
  39. # ---------------------------------------------------------------------------------------------------------------------
  40. # end target check
  41. else
  42. echo "Please source this file from within the PawPaw root directory"
  43. fi
  44. # ---------------------------------------------------------------------------------------------------------------------