The Makefile cross-compiles the game with Embedded Swift and packages a` HelloPlaydate.pdx` containing both the device binary and the simulator dylib. It needs:
- a swift.org development-snapshot toolchain (Xcode's toolchain does not ship the Embedded Swift stdlib for the device target). A toolchain installed at `~/Library/Developer/Toolchains` is picked up automatically; otherwise pass `TOOLCHAINS=<bundle id>`.
Swift code is compiled with `-Osize` by default; use `make SWIFT_OPT=-O` to favor speed over size. Sideload the pdx from the Playdate Simulator (Device > Upload Game to Device) or with the SDK's `pdutil`.
## Make targets
All build targets package `HelloPlaydate.pdx` with the SDK's `pdc`. Note that every target — the simulator-only ones included — needs the device toolchain setup above, because the shared make rules resolve it up front;` build.sh` is the simulator flow without that requirement.
| Target | Effect |
|---|---|
| `make` | Build the device binary and the simulator dylib (alias: `make all`) |
| `make simulator` | Build the simulator dylib only |
| `make device` | Build the device binary only |
| `make run` | Build the simulator flavor and open the pdx in the Playdate Simulator |
| `make clean` | Remove the `build/` and `.build/` folders, the pdx, and the binaries copied into `Source/` |