-
Notifications
You must be signed in to change notification settings - Fork 8
/
BUILDING
150 lines (85 loc) · 4.29 KB
/
BUILDING
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
-------------------------------------------------------------------------------
BUILD INSTRUCTIONS
This package is built using CMake.
CMake is an open-source, cross-platform family of tools designed to build,
test and package software. CMake is used to control the software compilation
process using simple platform and compiler independent configuration files,
and generate native makefiles and workspaces that can be used in the compiler
environment of your choice.
If you are already familiar with GNU autoconf tools, CMake basically replaces
the "autogen.sh" and "configure" steps with a portable, platform independent
way of creating makefiles that can be used to build your project/package with.
CMake can be downloaded and installed from:
https://cmake.org/
-------------------------------------------------------------------------------
DECNUMBER
The decNumber project is hosted on GitHub at the following URL:
https://github.com/hercules-390/decNumber-icu-368.git
You can either clone the git repository (recommended) or download the source
code .zip file from github. (click the green "Clone or download" button and
select "Download")
Once downloaded, create a build directory (*outside* the source/repostiory
directory) where the build will take place, called:
xxxxxxxxAA.yyyyyyy
where "xxxxxxxx" is the name of the project/package (e.g. "decNumber"), "AA"
is the build architecture ("32" or "64") and "yyyyyyy" is the configuration
type ("Debug" or "Release"):
mkdir decNumber32.Debug
mkdir decNumber32.Release
mkdir decNumber64.Debug
mkdir decNumber64.Release
On Windows, "xxxxxxxxAA" will be used for the INSTALL_PREFIX (the name of
the directory where the package will be installed to (target of make install).
On Linux, the default INSTALL_PREFIX is /usr/local. Either can be overridden
by specifying the "-D INSTALL_PREFIX=instdir" option on your cmake command.
Once the binary/build directory is created, to build and install the package
into the specified installation directory, simply use the commands:
(Windows)
> mkdir <build-dir>
> cd <build-dir>
> vstools [32|64]
> cmake -G "NMake Makefiles" srcdir
> nmake
> nmake install
(Linux)
$ mkdir <build-dir>
$ cd <build-dir>
$ cmake srcdir
$ make
# sudo make install
Where "srcdir" is the package's source (repository) directory, where the
"CMakeLists.txt" file exists.
The "vstools.cmd" batch file (Windows only) initializes the proper Microsoft
Visual C/C++ build environment for the chosen build architecture (32 bit or
64 bit) and must be issued before the cmake and nmake commands.
To override the default installation directory use the -D INSTALL_PREFIX=xxx
cmake option:
(Windows)
> cmake -G "NMake Makefiles" -D INSTALL_PREFIX=dirpath srcdir
(Linux)
$ cmake -D INSTALL_PREFIX=dirpath srcdir
Surround "INSTALL_PREFIX=dirpath" with double quotes if it contains blanks.
-------------------------------------------------------------------------------
CLANG
To build on Linux platforms using clang instead of gcc, simply export the
CC and CXX flags before invoking CMake:
$ export CC=clang
$ export CXX=clang++
$ cmake srcdir
If clang/clang++ is not in your $PATH, then you will need to specify its
full path in the CC/CXX export commands.
-------------------------------------------------------------------------------
BUILD.CMD
On Windows, to make things REALLY SIMPLE, you can instead use the provided
"build.cmd" script which performs the complete build for you automatically
by creating the build directory and automatically invoking each command:
build -i srcdir
Enter "build /?" or "build --help" for more information.
-------------------------------------------------------------------------------
BUILD
On Linux, to make things REALLY SIMPLE, you can instead use the provided
"build" bash script which performs the complete build for you automatically
by creating the build directory and automatically invoking each command:
build -i srcdir
Enter "build -h" or "build --help" for more information.
-------------------------------------------------------------------------------