Andrew Belt 4fa040cee1 | 4 years ago | |
---|---|---|
.gitignore | 4 years ago | |
Dockerfile | 4 years ago | |
Makefile | 4 years ago | |
README.md | 4 years ago |
Compile Rack plugins for Mac, Windows, and Linux with a single command on any Linux distro.
Clone this repository in a path without spaces, or the Makefile will break.
Obtain MacOSX10.13.sdk.tar.bz2
using the method at https://github.com/tpoechtrager/osxcross#packaging-the-sdk, and place it in the root of this repository.
This must be done on a computer with Mac 10.13.
There are two ways to build the toolchains:
Requires a Linux host.
Install toolchain build dependencies. On Ubuntu,
sudo make dep-ubuntu
Or on Arch Linux,
sudo make dep-arch-linux
Build toolchains for each platform.
make toolchain-lin
make toolchain-win
make toolchain-mac
Each toolchain will take around an hour to build, requiring network access and about 15 GB free disk space. The final disk space after building is about 3.7 GB.
Build your plugin.
make plugin-build PLUGIN_DIR=...
To speed up builds, use -jN
to launch N parallel jobs, such as your number of logical cores.
Built plugin packages are placed in the plugin-build/
directory.
Works on any operating system with Docker installed.
Build the Docker container with toolchains for all platforms.
make docker-build
Build your plugin.
make docker-plugin-build PLUGIN_DIR=...
Built plugin packages are placed in the plugin-build/
directory.
Thanks to @cschol for help with crosstool-ng, Ubuntu, Docker, and testing.