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.

65 lines
1.6KB

  1. #!/bin/bash
  2. PAWPAW_ROOT="${PWD}"
  3. VALIDATE_TARGET=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 [ -z "${INVALID_TARGET}" ]; 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 CFLAGS="${TARGET_CFLAGS} ${EXTRA_CFLAGS}"
  23. export CXXFLAGS="${TARGET_CXXFLAGS} ${EXTRA_CXXFLAGS}"
  24. export LDFLAGS="${TARGET_LDFLAGS} ${EXTRA_LDFLAGS}"
  25. export PKG_CONFIG_PATH="${TARGET_PKG_CONFIG_PATH}"
  26. unset CPPFLAGS
  27. export OLD_PATH="${PATH}"
  28. export PATH="${TARGET_PATH}"
  29. alias ar=${AR}
  30. alias cc=${CC}
  31. alias cpp=${CPP}
  32. alias gcc=${CC}
  33. alias g++=${CXX}
  34. alias ld=${ld}
  35. alias strip=${strip}
  36. echo "Success! Environment is now ready to build stuff"
  37. fi
  38. # ---------------------------------------------------------------------------------------------------------------------
  39. # end target check
  40. else
  41. echo "Please source this file from within the PawPaw root directory"
  42. fi
  43. # ---------------------------------------------------------------------------------------------------------------------