1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
lokinet/CROSSCOMPILE.md

59 lines
1 KiB
Markdown
Raw Normal View History

2019-07-16 16:05:40 +02:00
# Cross Compile
Currently supported targets:
Tier 1:
* Linux (arm/x86)
* Windows (32 and 64 bit x86)
* FreeBSD (amd64)
Tier 2:
* Mac OSX (> 10.10)
* Android (arm/x86)
* Apple IOS
* Linux PPC64 (little endian)
Tier 3:
* Big Endian Linux
* NetBSD
* OpenBSD
Unsupported (feel free to support this yourself)
* AIX
* zOS
## For Windows
To cross compile for windows on non windows platforms run:
$ make windows
## For Other Linux
2019-07-16 16:11:05 +02:00
## deps
this setup assumes ubuntu
first you need to cross compile and install libuv:
$ git clone https://github.com/libuv/libuv
$ mkdir -p build && cd build
$ export TOOLCHAIN=arm-linux-gnueabihf # or whatever your compiler is
$ cmake -DCMAKE_C_COMPILER=$(TOOLCHAIN)-gcc-8 -DCMAKE_INSTALL_PREFIX=/usr/$(TOOLCHAIN)
$ make
$ sudo make install
## build
2019-07-16 16:05:40 +02:00
To cross compile on linux for another archietecture:
2019-07-16 16:11:05 +02:00
# for rpi 3
2019-07-16 16:05:40 +02:00
$ make CROSS=ON TOOLCHAIN=contrib/armhf.toolchain.cmake
# for ppc64le
$ make CROSS=ON TOOLCHAIN=contrib/ppc64le.toolchain.cmake