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