README 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. MULTI-PLATFORM SUPPORT FOR MEGAZEUX
  2. The arch/ directory structure contains any code/machinery which is platform
  3. specific. Though is it dubiously named "arch" this refers to the platform
  4. "architecture" rather than the CPU architecture. For example, although GP2X
  5. and NDS both use ARM CPUs, they require different library and build system
  6. machinery to work correctly.
  7. DIRECTORY LAYOUT
  8. Most directories here contain at least a README file describing what toolchain
  9. and dependencies they require to work correctly. Some might also define
  10. additional targets, for post-processing binaries or installing them on the
  11. system.
  12. Additionally, all of these directories must have a Makefile.in which the build
  13. system will automatically include. This file should initialize any variables
  14. that can be tweaked, for example the location of libraries or compiler flags.
  15. The existing Makefile.in files should be a reasonable guide to this
  16. functionality.
  17. ADDING A PLATFORM TO MEGAZEUX
  18. Adding support for a new platform is trivial. Think of a short name for the
  19. platform (for example, Nintendo Dual-Screen is "nds") then create a directory
  20. in arch/ with that name. Create a Makefile.in for your platform. Initially,
  21. you may find configuring for "unix" and then manually altering the
  22. "platform.inc" in the top level is enough to get your build to succeed.
  23. Then, some changes must be made to config.sh to automatically generate both
  24. the src/config.h header (which is fully generic) and the platform.inc. This
  25. script is what users of your port will invoke to build the package.
  26. You may also want to make sure the "build" and "archive" targets do something
  27. for your platform. These targets make auto-builds and shipping binary
  28. packages much easier.
  29. --ajs.