build.xml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <!--
  2. - Overall Android native build script (for convenience)
  3. -
  4. - If new GamePlay samples are added please keep this list
  5. - in sync.
  6. -->
  7. <project name="GamePlay-Android" default="all" basedir=".">
  8. <fail message="OS not supported (must be Windows, MacOS X, or Linux)">
  9. <condition>
  10. <not>
  11. <or>
  12. <os family="unix"/> <!-- includes MacOS X -->
  13. <os family="windows"/>
  14. </or>
  15. </not>
  16. </condition>
  17. </fail>
  18. <macrodef name="build-native">
  19. <attribute name="location"/>
  20. <sequential>
  21. <!-- Non-Windows execs -->
  22. <exec osfamily="unix" dir="@{location}/android" executable="android">
  23. <arg value="update"/>
  24. <arg value="project"/>
  25. <arg value="-t"/>
  26. <arg value="1"/>
  27. <arg value="-p"/>
  28. <arg value="."/>
  29. <arg value="-s"/>
  30. </exec>
  31. <exec osfamily="unix" dir="@{location}/android" executable="ndk-build"/>
  32. <!-- Windows execs -->
  33. <exec osfamily="windows" dir="@{location}/android" executable="cmd">
  34. <arg value="/c"/>
  35. <arg value="android.bat"/>
  36. <arg value="update"/>
  37. <arg value="project"/>
  38. <arg value="-t"/>
  39. <arg value="1"/>
  40. <arg value="-p"/>
  41. <arg value="."/>
  42. <arg value="-s"/>
  43. </exec>
  44. <exec osfamily="windows" dir="@{location}/android" executable="cmd">
  45. <arg value="/c"/>
  46. <arg value="ndk-build"/>
  47. </exec>
  48. </sequential>
  49. </macrodef>
  50. <target name="all">
  51. <build-native location="gameplay"/>
  52. <build-native location="samples/browser"/>
  53. <build-native location="samples/character"/>
  54. <build-native location="samples/lua"/>
  55. <build-native location="samples/mesh"/>
  56. <build-native location="samples/particles"/>
  57. <build-native location="samples/racer"/>
  58. <build-native location="samples/spaceship"/>
  59. </target>
  60. </project>