From 2024031f7f1ca9192e70ee63c2093d751332440c Mon Sep 17 00:00:00 2001
From: rulrich <ralf.m.ulrich@kit.edu>
Date: Tue, 14 Jul 2020 22:53:53 +0200
Subject: [PATCH] no preshower

---
 Makefile | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index d7785d2..0559ad1 100644
--- a/Makefile
+++ b/Makefile
@@ -41,7 +41,7 @@ MC3D   =
 #MC3D   = -D__MC3D__ -D__COAST__
 LOWMEMORY = -D__SORT_FOR_ENERGY__
 #LOWMEMORY= -D__SAVEMEMO__  -D__SORT_FOR_ENERGY__ -D__CXDEBUG__
-CPPFLAGS = -D__URQMD__ -D__CXSUB__ -D__PRESHOW__  $(LOWMEMORY) $(CONEX_EXTENSIONS) $(MC3D) -fPIC
+CPPFLAGS = -D__URQMD__ -D__CXSUB__  $(LOWMEMORY) $(CONEX_EXTENSIONS) $(MC3D) -fPIC
 # compiler selection
 COMP := `which gfortran 2>&1 | grep -v which`
 COMPIL := "$(shell echo $(COMP))"
@@ -70,8 +70,14 @@ ifndef CX_NO_ROOT
   ROOTLDFLAGS := -Wl,--no-as-needed $(shell root-config --libs)
   CCFLAGS+= $(ROOTCFLAGS)
 endif
+PRESHOW_OBJS := 
 ifdef CORSIKA_8
+  # use HE/LE model code from C8, not from CONEX
   CPPFLAGS += -D__CORSIKA8__
+else
+  # do not include preshower in C8
+  CPPFLAGS += -D__PRESHOW__
+  PRESHOW_OBJS := $(OBJDIR)/preshw.o $(OBJDIR)/utils.o $(OBJDIR)/veto.o
 endif
 
 ifeq ("$(SYSTEM)", "Darwin")
@@ -108,7 +114,7 @@ FFLAGS += $(OPTIMZE) $(DEBUG)
 CFLAGS += $(OPTIMZE) $(DEBUG)
 CXXFLAGS += $(OPTIMZE) $(DEBUG)
 
-OBJS := $(OBJDIR)/conex_f.o $(OBJDIR)/preshw.o $(OBJDIR)/utils.o $(OBJDIR)/veto.o $(OBJDIR)/leadingInteractionsData.o
+OBJS := $(OBJDIR)/conex_f.o $(OBJDIR)/leadingInteractionsData.o
 
 ifdef CONEX_EXTENSIONS
  ifndef CX_NO_ROOT
@@ -132,7 +138,7 @@ endif
 
 BZ2=""
 INTERFACE_SOURCE := $(TABDIR)/readLib/source/Interface.dummy.cc
-OBJS += $(OBJDIR)/Interface.o
+OBJS += $(OBJDIR)/Interface.o $(PRESHOW_OBJS)
 ifndef NO_BOOST
   BZ2=".bz2"
   INTERFACE_SOURCE := $(TABDIR)/readLib/source/Interface.boost.cc
-- 
GitLab