]> sigrok.org Git - sigrok-util.git/blob - cross-compile/mingw/README
sigrok-cross-mingw: Update MXE and MinGW related docs.
[sigrok-util.git] / cross-compile / mingw / README
1 -------------------------------------------------------------------------------
2 README
3 -------------------------------------------------------------------------------
4
5 This is a small script for cross-compiling sigrok and its dependencies
6 for MinGW-w64/Windows systems.
7
8
9 Status
10 ------
11
12 Working.
13
14
15 Requirements
16 ------------
17
18  - bash
19  - gcc
20  - make
21  - cmake
22  - git
23  - wget
24  - unzip
25  - p7zip
26  - pkg-config (>= 0.22)
27  - sdcc (needed for building the fx2lafw firmware)
28  - nsis
29  - MXE (*-w64-* targets, the *-pc-* targets are not supported)
30
31
32 MXE setup
33 ---------
34
35 First, get the MXE cross-compile environment for MinGW-w64/Windows:
36
37  $ cd $HOME
38  $ git clone https://github.com/mxe/mxe.git mxe-git
39  $ cd mxe-git
40
41 For now we need to build gcc and winpthreads in two steps. First:
42
43  $ make MXE_TARGETS=i686-w64-mingw32.static gcc winpthreads
44
45 In src/gcc.mk change "--enable-threads=win32" to "--enable-threads=posix".
46
47 Then build gcc again:
48
49  $ make MXE_TARGETS=i686-w64-mingw32.static gcc
50
51 We now have a system that supports C++11 std::thread. Now build the rest:
52
53  $ make MXE_TARGETS=i686-w64-mingw32.static glib libzip libusb1 libftdi \
54    qt boost check
55
56 This will take a while.
57
58 See http://mxe.cc for details on MXE.
59
60
61 Building
62 --------
63
64  $ ./sigrok-cross-mingw
65
66 Per default it expects MXE in:
67
68  $HOME/mxe-git
69
70 Per default it will install the cross-compiled packages in:
71
72  $HOME/sr_mingw
73
74 Please edit the script if you want to change any settings.
75