-
Notifications
You must be signed in to change notification settings - Fork 36
/
INSTALL
107 lines (56 loc) · 2.11 KB
/
INSTALL
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
This file contains instructions for building "piqi" command-line executable from
source code.
Pre-built binaries can be downloaded from http://piqi.org/downloads/
SUPPORTED PLATFORMS
===================
Piqi has been tested on Linux (i386 and amd64 architectures), Mac OS X and
FreeBSD. It is also known to work on Windows and Solaris.
Piqi is written in OCaml so, in theory, it should work on platforms and hardware
architectures supported by OCaml. See the list of supported platforms at
http://caml.inria.fr/ocaml/portability.en.html
PREREQUISITES
=============
1. Install OCaml and opam (package manager for OCaml)
On Debian and Ubuntu:
apt-get install opam
On Mac OS X (using Homebrew):
brew install ocaml opam
On other systems, see [OPAM](http://opam.ocaml.org/)
To cross-compile for Windows, see the "CROSS-COMPILATION" section below
2. Configure opam
opam init
eval `opam config env`
3. Install dependencies
opam install --deps-only ./opam
also available as "make deps" shortcut
INSTALLATION INSTRUCTIONS
=========================
1. Run ./configure
Run "./configure --help" for the list of available options.
2. Build Piqi
make
3. Install the "piqi" binary along with the "piqi.1" man page
make install
4. (Optional) build HTML documentation -- see doc/README.md for more details
make doc
RUNNING TESTS
=============
make test
See tests/README for further information.
CROSS-COMPILATION
=================
To build a Windows (win64) executable on Linux/MacOsX:
1. Install OCaml cross-compiler and cross-compiled dependencies
Follow instructions here: https://github.com/ocaml-cross/opam-cross-windows
For example, on Mac OS X:
brew install mingw-w64 gawk
opam repository add windows git://github.com/ocaml-cross/opam-cross-windows
opam switch 4.08.0
eval `opam config env`
opam install ocaml-windows64 sedlex-windows easy-format-windows
2. Build
./configure --toolchain windows
make deps
make
make strip # optional
# ex: sw=4 et