aboutsummaryrefslogtreecommitdiffstats
path: root/doc/getting/mcode.rst
blob: 9e46a29b61b9d8ee0e2f1e749501b02e76b223e4 (plain)
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
.. _BUILD:mcode:

mcode backend
#############

The mcode backend is available for all supported platforms and is also the
simplest procedure, because it requires the fewest dependencies and configuration
options.

.. _BUILD:mcode:GNAT:

GCC/GNAT: GNU/Linux or Windows (MinGW/MSYS2)
============================================

.. rubric:: Requirements

* GCC (Gnu Compiler Collection)
* GNAT (Ada compiler for GCC)

GHDL is configured by ``configure`` and built by ``make``.

* First, GHDL needs to be configured. It is common to specify a ``PREFIX``
  (installation directory like ``/usr/local`` or ``/opt/ghdl``). Without any
  other option, ``configure`` selects `mcode` as the backend.

* Next, ``make`` starts the compilation process.

* Finally, ``make install`` installs GHDL into the installation directory
  specified by ``PREFIX``.

.. HINT :: ON GNU/Linux, you may need super user privileges (``sudo ...``).


.. rubric:: Example:

.. code-block:: Bash

   $ cd <ghdl>
   $ mkdir build
   $ cd build
   $ ../configure --prefix=PREFIX
   $ make
   $ make install

.. _BUILD:mcode:GNATGPL-Windows:

GNAT GPL: Windows
=================

.. rubric:: Requirements

* GNAT GPL from http://libre.adacore.com
* PowerShell 4
* PowerShell Community Extensions (PSCX)

.. rubric:: `compile.ps1`

.. code-block::

   Commands          Description
   --------------------------------------------------------------------
   -Help             Display the integrated help pages
   -Clean            Clean up all files and directories
   -Compile          Compile GHDL
   -Install          Install all files into a directory (xcopy deployment)
   -Uninstall        Uninstall all files from a directory
   -Update           Update files in the installation directory
   -CreatePackage    create an installer package

   Install options:
   -InstallPath      Installation directory

   CreatePackage options:
   -Zip              Create a zip-file for xcopy deployment