From 2f4a08e452002d34a0e9e0fe0c8d96405244a378 Mon Sep 17 00:00:00 2001
From: Maximilian Reininghaus <maximilian.reininghaus@tu-dortmund.de>
Date: Sun, 19 Mar 2023 10:56:27 +0100
Subject: [PATCH] documentation

---
 README.md                    | 12 ++++++++++++
 modules/fluka/CMakeLists.txt |  1 +
 2 files changed, 13 insertions(+)

diff --git a/README.md b/README.md
index 13e840d6a..a41b18bf8 100644
--- a/README.md
+++ b/README.md
@@ -63,6 +63,7 @@ You will also need:
 - cmake 
 - git
 - g++, gfortran, binutils, make
+- optional: FLUKA (see below)
 
 On a bare Ubuntu 20.04, just add:
 ``` shell
@@ -98,6 +99,17 @@ make -j8
 make install
 ```
 
+### FLUKA support
+For legal reasons we do not distribute/bundle FLUKA together with CORSIKA 8.
+If you want to use FLUKA as low-energy hadronic interaction model, you have to download
+it separately from (http://www.fluka.org/), which requires registering there as FLUKA user.
+You need to download binaries suitable for your system (check compiler and glibc versions)
+and unpack the binaries into a directory of your choice. You also need the data archive
+(fluka20xy.z-data.tar.gz) unpacked in the same directory. To compile CORSIKA 8 with FLUKA,
+you need to specify the path of libflukahp.a when invoking cmake with the option
+`-DC8_FLUKALIB=<path>`. CMake will print a status message indicating whether FLUKA support
+is enabled or disabled when the library is (not) found.
+
 
 ## Installation (using docker containers)
 
diff --git a/modules/fluka/CMakeLists.txt b/modules/fluka/CMakeLists.txt
index d760442bf..b9cad711b 100644
--- a/modules/fluka/CMakeLists.txt
+++ b/modules/fluka/CMakeLists.txt
@@ -1,6 +1,7 @@
 set(C8_FLUKALIB CACHE STRING "path to libflukahp.a")
 
 if (EXISTS "${C8_FLUKALIB}")
+    message("libflukahp.a fount at ${C8_FLUKALIB}; FLUKA support is enabled.")
     set (input_dir ${PROJECT_SOURCE_DIR}/src/modules/fluka)
     
     # we remove flrndm_.o from the original libflukahp.a and save the result as libflukahp-norndm.a
-- 
GitLab