File: INSTALL.mingw

package info (click to toggle)
libosl 0.8.0-1.4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,208 kB
  • ctags: 13,120
  • sloc: cpp: 114,344; ruby: 1,290; ansic: 915; makefile: 430; perl: 309; sh: 35
file content (75 lines) | stat: -rw-r--r-- 2,084 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
How to compile using Mingw
==========================

This document depicts how to compile OSL and GPSShogi with Mingw cross
compiler on Debian/Linux, targeting Windows. It is recommended to use Debian
sid version for cross compiling (as GPSShogi developers do). Using virtual
machines such as VirtualBox would be convenient to run Debian sid of an
unstable flavor.

Setup Mingw
-----------

* Install mingw and cmake

$ sudo apt-get install mingw-w64-dev cmake
$ cp ./Toolchain-i686-mingw32.cmake.sample ~/Toolchain-i686-mingw32.cmake

CMake is used as a build tool.


Build dependencies
------------------

1. Bzip

- ~/local/src/bzip2-1.0.6
- http://www.bzip.org/
- vim Makefile
  CC=i686-w64-mingw32-gcc
  AR=i686-w64-mingw32-ar
  RANLIB=i686-w64-mingw32-ranlib
  LDFLAGS=-Wl,-s
- % vim bzip2.c
  Replace with sys/stat.h
% make CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer -ffast-math -D_FILE_OFFSET_BITS=64" LDFALGS="-Wl,-s"
% mkdir target
% make install PREFIX=target
% sudo cp target/include/bzlib.h /usr/i686-w64-mingw32/include
% sudo cp target/lib/libbz2.a /usr/i686-w64-mingw32/lib


2. Boost 1.54.0

- ~/local/src/boost_1_46_1
% chmod 755 */.sh
% cat ./user-config.jam
    using gcc : 4.6 : i686-w64-mingw32-g++ :
      <rc>/usr/bin/i686-w64-mingw32-windres
      <archiver>/usr/bin/i686-w64-mingw32-ar ;
% ./bootstrap.sh --without-icu
% ./bjam -j4 toolset=gcc target-os=windows variant=release threading=multi threadapi=win32 --without-mpi --without-python -sNO_ZLIB=1 -sNO_BZIP2=0 --layout=tagged --user-config=user-config.jam 2>&1 | tee mingw.log
% cd stage/lib
% i686-w64-mingw32-ranlib *.a


Build OSL
---------

$ cd /path/to/osl
$ mkdir mingw-release & cd mingw-release
$ cmake -DCMAKE_TOOLCHAIN_FILE=$HOME/Toolchain-i686-mingw32.cmake -DCMAKE_BUILD_TYPE:STRING=Release ..
$ make


Build GPS
---------
$ cd /path/to/gpsshogi/bin
$ mkdir mingw-release & cd mingw-release
$ cmake -DCMAKE_TOOLCHAIN_FILE=$HOME/Toolchain-i686-mingw32.cmake -DCMAKE_BUILD_TYPE:STRING=Release ..
$ make
$ make package


---
2014-05-17  Daigo Moriwaki <daigo at debian dot org>