xmake.lua 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package("ti-cgt")
  2. set_kind("toolchain")
  3. set_homepage("https://www.ti.com")
  4. set_description("TI CGT (code generate tool) are TI's compilers for TI C2000 DSP, TI C6000 DSP, TI Arm board.")
  5. if is_host("windows") then
  6. add_urls("https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-vqU2jj6ibH/$(version)/ti_cgt_c6000_$(version)_windows-x64_installer.exe")
  7. add_versions("8.3.13", "48d6a56f447e6b44f18bdcb4d1338362ef2eda2e3d329f38b296c63b21964b91")
  8. add_versions("8.3.12", "7273edf24f82eb5ac8192a2b74b4660c63a5b591e567b46ddce19db015704ab2")
  9. elseif is_host("linux") then
  10. add_urls("https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-vqU2jj6ibH/$(version)/ti_cgt_c6000_$(version)_linux-x64_installer.bin")
  11. add_versions("8.3.13", "436d9cda768e042e61fd6ab1293d008eb23cc167b2a9a7db49766cd94d8f6bcd")
  12. add_versions("8.3.12", "050518940e4cdbd2068ca1b490426f1d008e80b89d617efbc0c40f432869e09a")
  13. elseif is_host("macosx") then
  14. add_urls("https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-vqU2jj6ibH/$(version)/ti_cgt_c6000_$(version)_osx_installer.app.zip")
  15. add_versions("8.3.13", "fff6e2c55f2535bbf01e991c7de1e75e4d0c6610acef4d5801a6342ae25ae096")
  16. end
  17. on_install("windows|x64", "linux|x86_64", function(package)
  18. local version = package:version()
  19. local installer = "ti_cgt_c6000_" .. version .. "_"
  20. if is_host("windows") then
  21. installer = "../" .. installer .. "windows-x64_installer.exe"
  22. else
  23. if is_host("linux") then
  24. installer = "../" .. installer .. "linux-x64_installer.bin"
  25. elseif is_host("macosx") then
  26. os.cd(installer .."osx_installer.app/Contents/MacOS")
  27. installer = "installbuilder.sh"
  28. -- TODO
  29. end
  30. os.vrunv("chmod", {"+x", installer})
  31. end
  32. os.vrunv(installer, {"--mode", "unattended", "--prefix", os.curdir()})
  33. os.vcp("ti-cgt-c6000_" .. version .."/bin", package:installdir())
  34. os.vcp("ti-cgt-c6000_" .. version .."/lib", package:installdir())
  35. os.vcp("ti-cgt-c6000_" .. version .."/include", package:installdir())
  36. end)
  37. on_test(function (package)
  38. os.vrun("cl6x -h Include")
  39. end)