... | ... | @@ -48,14 +48,14 @@ _make_ with _make -e_ everywhere below. How to set variables depends on the |
|
|
shell you are using. Here is an example of some commonly used shells:
|
|
|
|
|
|
csh/tcsh:
|
|
|
''setenv CXX pgCC''
|
|
|
setenv CXX pgCC
|
|
|
|
|
|
bash/sh/ksh/...
|
|
|
''export CXX="pgCC"'' (no spaces around the "="!)
|
|
|
export CXX="pgCC" (no spaces around the "="!)
|
|
|
|
|
|
A third option is to override the setting in the make command itself, e.g.:
|
|
|
|
|
|
''make CXX=pgCC CXXFLAGS=-g''
|
|
|
make CXX=pgCC CXXFLAGS=-g
|
|
|
|
|
|
|
|
|
### What is the OPT field for?
|
... | ... | @@ -65,11 +65,11 @@ you need a debug compilation instead (e.g. because you modified the code and ran |
|
|
problems), you can do that without having to modify the Makefile.conf file by
|
|
|
simply typing:
|
|
|
|
|
|
''make OPT=-O0''
|
|
|
make OPT=-O0
|
|
|
|
|
|
Alternatively, you can achieve the same thing by typing (only for releases after C08):
|
|
|
|
|
|
''make debug''
|
|
|
make debug
|
|
|
|
|
|
See also the section above on "Configuring for a specific compiler" for further options during the build
|
|
|
process. Note that you need to clean the directory first if an earlier build was done. See the section "Cleaning up" below for more details.
|
... | ... | @@ -79,7 +79,7 @@ process. Note that you need to clean the directory first if an earlier build was |
|
|
|
|
|
The makefile will automatically set the path to the data files for you, so the steps outlined here are usually not necessary. If you want a search path that differs from the default, you need to set an environment variable CLOUDY_DATA_PATH prior to compiling. It should contain the full path to the data directory, e.g.:
|
|
|
|
|
|
''export CLOUDY_DATA_PATH="/path/to/cloudy/data"''
|
|
|
export CLOUDY_DATA_PATH="/path/to/cloudy/data"
|
|
|
|
|
|
In case you don't do this, the makefile will assume a standard directory layout and assume that the data reside in "/path/to/cloudy/source/../data/". For most people, this default will be fine.
|
|
|
|
... | ... | @@ -105,7 +105,7 @@ the most likely reason is that the path has not been properly set. |
|
|
When you have finished the setup from the previous section, you can compile the code by
|
|
|
simply typing
|
|
|
|
|
|
''make''
|
|
|
make
|
|
|
|
|
|
The resulting executable will be named cloudy.exe. The makefile will only work with
|
|
|
GNU _make_, which may be named _gmake_ on non-Linux Unix systems.
|
... | ... | @@ -116,7 +116,7 @@ GNU _make_, which may be named _gmake_ on non-Linux Unix systems. |
|
|
If you have a multi-core
|
|
|
computer, you can take advantage of this by doing a parallel build with
|
|
|
|
|
|
''make -j <n>''
|
|
|
make -j <n>
|
|
|
|
|
|
where <n> is the number of cores you want to use.
|
|
|
|
... | ... | @@ -148,7 +148,7 @@ the compiler you chose may not be able to do this. |
|
|
|
|
|
If you modify Cloudy and add new source files, or add new #include statements in existing source files, the dependencies of the code will change. The program make will have no way of knowing this, hence you will have to recreate Makefile.dep yourself by typing:
|
|
|
|
|
|
''make depend''
|
|
|
make depend
|
|
|
|
|
|
Starting with C13, the dependencies are no longer kept in a single dependencies file, but are distributed over many small files ending in ".d". These are kept up to date automatically every time you invoke make. Hence there should never be a need anymore to type `make depend`, though the command is still recognized. In C13 and later the dependencies can be built in parallel.
|
|
|
|
... | ... | @@ -157,7 +157,7 @@ Starting with C13, the dependencies are no longer kept in a single dependencies |
|
|
|
|
|
Starting with the C13 release, Cloudy includes data (e.g. molecular line lists) that need to be converted to internally supported data formats. Normally this is done automatically when you build the binary. If however, in exceptional cases, you need to build the data separately, you can do that by typing
|
|
|
|
|
|
''make [ -j <n> ] data''
|
|
|
make [ -j <n> ] data
|
|
|
|
|
|
in the source directory, or you can go into the specific subdirectory containing the data and type _make [ -j <n> ]_ there.
|
|
|
|
... | ... | @@ -166,22 +166,22 @@ in the source directory, or you can go into the specific subdirectory containing |
|
|
|
|
|
You can clean up the source directory by issuing
|
|
|
|
|
|
''make clean''
|
|
|
make clean
|
|
|
|
|
|
This will remove all the object files and the cloudy.exe binary. You can also
|
|
|
use
|
|
|
|
|
|
''make distclean''
|
|
|
make distclean
|
|
|
|
|
|
which will revert everything to a pristine state, as if you had just downloaded Cloudy. Hence
|
|
|
a full compilation from scratch can be forced by issuing the commands
|
|
|
|
|
|
''make clean''
|
|
|
make clean
|
|
|
|
|
|
''make''
|
|
|
make
|
|
|
|
|
|
A full compilation forcing the reconstruction of the file dependencies and the data files can be done with
|
|
|
|
|
|
''make distclean''
|
|
|
make distclean
|
|
|
|
|
|
''make'' |
|
|
\ No newline at end of file |
|
|
make |
|
|
\ No newline at end of file |