Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mxe/mxe
MXE (M cross environment)
https://github.com/mxe/mxe
cross-compiler cross-environment gnumakefile makefile mingw mingw-w64 mxe
Last synced: 11 days ago
JSON representation
MXE (M cross environment)
- Host: GitHub
- URL: https://github.com/mxe/mxe
- Owner: mxe
- License: other
- Created: 2012-03-22T13:01:48.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2024-04-12T01:27:19.000Z (7 months ago)
- Last Synced: 2024-04-13T00:03:03.167Z (7 months ago)
- Topics: cross-compiler, cross-environment, gnumakefile, makefile, mingw, mingw-w64, mxe
- Language: Makefile
- Homepage: https://mxe.cc
- Size: 25.3 MB
- Stars: 1,158
- Watchers: 67
- Forks: 511
- Open Issues: 221
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# MXE (M cross environment)
[![License][license-badge]][license-page]
[license-page]: LICENSE.md
[license-badge]: https://img.shields.io/badge/License-MIT-brightgreen.svg[![Async Chat (Trial))](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://mxe.zulipchat.com/)
MXE (M cross environment) is a GNU Makefile that compiles a cross
compiler and cross compiles many free libraries such as SDL and
Qt. Thus, it provides a nice cross compiling environment for
various target platforms, which:* is designed to run on any Unix system
* is easy to adapt and to extend
* builds many free libraries in addition to the cross compiler
* can also build just a subset of the packages, and automatically builds their dependencies
* downloads all needed packages and verifies them by their checksums
* is able to update the version numbers of all packages automatically
* directly uses source packages, thus ensuring the whole build mechanism is transparent
* allows inter-package and intra-package parallel builds whenever possible
* bundles [ccache](https://ccache.samba.org) to speed up repeated builds
* integrates well with autotools, cmake, qmake, and hand-written makefiles.
* has been in continuous development since 2007 and is used by several projects## Supported Toolchains
* Runtime: MinGW-w64
* Host Triplets:
- `i686-w64-mingw32`
- `x86_64-w64-mingw32`
* Packages:
- static
- shared
* GCC Threading Libraries (`winpthreads` is always available):
- [posix](https://github.com/mxe/mxe/pull/958) [(default)](https://github.com/mxe/mxe/issues/2258)
- win32 (supported by limited amount packages)
* GCC Exception Handling:
- Default
- i686: sjlj
- x86_64: seh
- [Alternatives (experimental)](https://github.com/mxe/mxe/pull/1664)
- i686: dw2
- x86_64: sjljPlease see [mxe.cc](https://mxe.cc/) for further information and package support matrix.
## Build Dependencies
For some packages additional dependencies are required to be installed in order to build:
* Python 3
## Usage
You can use the `make` command to start the build.
Below *an example* of cross-compiling the GTK3 project to one statically linked Windows 64-bit library:
```sh
make gtk3 -j 8 MXE_TARGETS='x86_64-w64-mingw32.static'
```Please see [mxe.cc](https://mxe.cc/) for more information about how-to build the MXE project.
## Packages
Within the [MXE makefiles](src) we either define `$(PKG)_GH_CONF` or `$(PKG)_URL`, which will be used to download the package.
Next the checksum will be validated of the downloaded archive file (sha256 checksum).Updating a package or updating checksum is all possible using the make commands, see [usage for more info](https://mxe.cc/#usage).
## Shared Library Notes
There are several approaches to recursively finding DLL dependencies (alphabetical list):
* [go script](https://github.com/desertbit/gml/blob/master/cmd/gml-copy-dlls/main.go)
* [pe-util](https://github.com/gsauthof/pe-util) packaged with [mxe](https://github.com/mxe/mxe/blob/master/src/pe-util.mk)
* [python script](https://github.com/mxe/mxe/blob/master/tools/copydlldeps.py)
* [shell script](https://github.com/mxe/mxe/blob/master/tools/copydlldeps.md)