| 1 | cfa-cc: Cforall to C Trans-compiler
 | 
|---|
| 2 | ======================================
 | 
|---|
| 3 | 
 | 
|---|
| 4 | Cforall is built on Linux using GNU Make and the GNU Autoconf system, which
 | 
|---|
| 5 | includes Windows WSL.  It also requires g++ version >= 9, bison and flex.  On
 | 
|---|
| 6 | systems where GNU Make is the default make, the system is built by entering the
 | 
|---|
| 7 | commands:
 | 
|---|
| 8 | 
 | 
|---|
| 9 | 1. For developers using the root git:
 | 
|---|
| 10 | 
 | 
|---|
| 11 |    $ ./autogen.sh
 | 
|---|
| 12 |    $ ./configure [ --prefix=/some/directory ]
 | 
|---|
| 13 |    $ make -j 8 install
 | 
|---|
| 14 |    $ cfa
 | 
|---|
| 15 | 
 | 
|---|
| 16 | 2. For users using the distributed tarball/github:
 | 
|---|
| 17 | 
 | 
|---|
| 18 |    $ ./configure
 | 
|---|
| 19 |    $ make -j 8 install
 | 
|---|
| 20 |    $ cfa
 | 
|---|
| 21 | 
 | 
|---|
| 22 | where 8 or greater is the number of CPUs on your computer.
 | 
|---|
| 23 | 
 | 
|---|
| 24 | The above instructions produce an in-tree, installed build, where intermediate
 | 
|---|
| 25 | binaries share the same folders as their sources, and where the final result
 | 
|---|
| 26 | becomes an "official" CFA version for the current environment.  For developers
 | 
|---|
| 27 | preferring an isolated side-by-side build, where all binaries are separated
 | 
|---|
| 28 | from sources, where it is possible to build multiple configurations from a
 | 
|---|
| 29 | common set of sources, and where no "official" CFA version is designated:
 | 
|---|
| 30 | 
 | 
|---|
| 31 |    $ ./autogen.sh
 | 
|---|
| 32 |    $ mkdir ../build
 | 
|---|
| 33 |    $ cd ../build
 | 
|---|
| 34 |    $ ../cfa-cc/configure
 | 
|---|
| 35 |    $ make -j 8
 | 
|---|
| 36 |    $ ./driver/cfa
 | 
|---|
| 37 | 
 | 
|---|
| 38 | 
 | 
|---|
| 39 | Options for configure
 | 
|---|
| 40 | ======================================
 | 
|---|
| 41 | The script 'configure' accepts many command-line arguments.  Run
 | 
|---|
| 42 | 
 | 
|---|
| 43 |    $ ./configure --help
 | 
|---|
| 44 | 
 | 
|---|
| 45 | to list them.  The most common argument is:
 | 
|---|
| 46 | 
 | 
|---|
| 47 |    --prefix=/some/directory controls the path prefix common to all installed
 | 
|---|
| 48 |      cfa-cc components.  Components are installed in directories bin and lib.
 | 
|---|
| 49 |      If unspecified, prefix defaults to /usr/local.  To use (a subdirectory of)
 | 
|---|
| 50 |      your home directory, ${HOME}/some/dir, but do not put quotes around the
 | 
|---|
| 51 |      directory path; Cforall may appear to build, but the installed version may
 | 
|---|
| 52 |      not work properly.
 | 
|---|
| 53 | 
 | 
|---|
| 54 | 
 | 
|---|
| 55 | Build Test
 | 
|---|
| 56 | ======================================
 | 
|---|
| 57 | 
 | 
|---|
| 58 |    $ cd ./tests
 | 
|---|
| 59 |    $ make -j 8 all-local
 | 
|---|
| 60 | 
 | 
|---|
| 61 | The tests take about 2-5 minutes and can be stopped at any time.
 | 
|---|