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.

local.env 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 NM="${TARGET_NM}"
  22. export RANLIB="${TARGET_RANLIB}"
  23. export STRIP="${TARGET_STRIP}"
  24. export WINDRES="${TARGET_WINDRES}"
  25. export CFLAGS="${TARGET_CFLAGS} ${EXTRA_CFLAGS}"
  26. export CXXFLAGS="${TARGET_CXXFLAGS} ${EXTRA_CXXFLAGS}"
  27. export LDFLAGS="${TARGET_LDFLAGS} ${EXTRA_LDFLAGS}"
  28. export PKG_CONFIG="${PAWPAW_PREFIX}/bin/pkg-config"
  29. export PKG_CONFIG_PATH="${TARGET_PKG_CONFIG_PATH}"
  30. unset CPP
  31. unset CPPFLAGS
  32. export OLD_PATH="${PATH}"
  33. export PATH="${TARGET_PATH}"
  34. alias ar=${AR}
  35. alias cc=${CC}
  36. alias gcc=${CC}
  37. alias g++=${CXX}
  38. alias ld=${ld}
  39. alias nm=${nm}
  40. alias ranlib=${ranlib}
  41. alias strip=${strip}
  42. echo "Success! Environment is now ready to build stuff"
  43. fi
  44. # ---------------------------------------------------------------------------------------------------------------------
  45. # end target check
  46. else
  47. echo "Please source this file from within the PawPaw root directory"
  48. fi
  49. # ---------------------------------------------------------------------------------------------------------------------