build.xml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <!-- Android build script -->
  2. <project name="gameplay" default="build" basedir=".">
  3. <fail message="OS not supported. Supported platforms: Windows, MacOS X or Linux.">
  4. <condition>
  5. <not>
  6. <or>
  7. <os family="unix"/>
  8. <os family="windows"/>
  9. </or>
  10. </not>
  11. </condition>
  12. </fail>
  13. <macrodef name="build-native">
  14. <attribute name="location"/>
  15. <sequential>
  16. <exec osfamily="unix" dir="@{location}/android" executable="android">
  17. <arg value="update"/>
  18. <arg value="project"/>
  19. <arg value="-t"/>
  20. <arg value="1"/>
  21. <arg value="-p"/>
  22. <arg value="."/>
  23. <arg value="-s"/>
  24. </exec>
  25. <exec osfamily="unix" dir="@{location}/android" executable="ndk-build"/>
  26. <exec osfamily="windows" dir="@{location}/android" executable="cmd">
  27. <arg value="/c"/>
  28. <arg value="android.bat"/>
  29. <arg value="update"/>
  30. <arg value="project"/>
  31. <arg value="-t"/>
  32. <arg value="1"/>
  33. <arg value="-p"/>
  34. <arg value="."/>
  35. <arg value="-s"/>
  36. </exec>
  37. <exec osfamily="windows" dir="@{location}/android" executable="cmd">
  38. <arg value="/c"/>
  39. <arg value="ndk-build"/>
  40. </exec>
  41. </sequential>
  42. </macrodef>
  43. <target name="build">
  44. <build-native location="gameplay"/>
  45. <build-native location="samples/browser"/>
  46. <build-native location="samples/character"/>
  47. <build-native location="samples/lua"/>
  48. <build-native location="samples/mesh"/>
  49. <build-native location="samples/particles"/>
  50. <build-native location="samples/racer"/>
  51. <build-native location="samples/spaceship"/>
  52. </target>
  53. </project>