From 3264a98635f84a06d382a7f26333e9c2981c05e3 Mon Sep 17 00:00:00 2001
From: Volker Springel <volker.springel@h-its.org>
Date: Thu, 3 Dec 2020 18:21:28 +0100
Subject: [PATCH] only compile vectorclass/instrset_detect.o when
 EXPLICIT_VECTORIZATION is activated

---
 Makefile | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index cabb331..49a9352 100644
--- a/Makefile
+++ b/Makefile
@@ -243,6 +243,7 @@ SUBDIRS += logs
 OBJS    += logs/logs.o
 INCL    += logs/logs.h logs/timer.h
 
+
 SUBDIRS += gitversion
 INCL    += gitversion/version.h
 
@@ -260,11 +261,6 @@ OBJS    += pm/pm_nonperiodic.o pm/pm_periodic.o \
 INCL    += pm/pm.h pm/pm_mpi_fft.h pm/pm_periodic.h pm/pm_nonperiodic.h
 
 
-SUBDIRS += vectorclass
-OBJS    += vectorclass/instrset_detect.o
-INCL    +=
-
-
 SUBDIRS += sort
 OBJS    += sort/peano.o
 INCL    += sort/peano.h sort/cxxsort.h sort/parallel_sort.h
@@ -274,6 +270,7 @@ SUBDIRS += sph
 OBJS    += sph/density.o sph/hydra.o sph/init_entropy.o sph/artificial_viscosity.o
 INCL    += sph/kernel.h sph/sph.h
 
+
 SUBDIRS += system
 OBJS    += system/pinning.o system/system.o
 INCL    += system/system.h system/pinning.h
@@ -308,6 +305,13 @@ OBJS    += ngbtree/ngbtree_build.o
 INCL    += ngbtree/ngbtree.h
 
 
+ifeq (EXPLICIT_VECTORIZATION,$(findstring EXPLICIT_VECTORIZATION,$(CONFIGVARS)))
+SUBDIRS += vectorclass
+OBJS    += vectorclass/instrset_detect.o
+INCL    +=
+endif
+
+
 ifeq (COOLING,$(findstring COOLING,$(CONFIGVARS)))
 OBJS    += cooling_sfr/cooling.o cooling_sfr/sfr_eos.o cooling_sfr/starformation.o
 INCL    += cooling_sfr/cooling.h
@@ -362,6 +366,7 @@ ifeq (LIGHTCONE_MASSMAPS,$(findstring LIGHTCONE_MASSMAPS,$(CONFIGVARS)))
 MAPS_LIBS += -lchealpix -lcfitsio #-lcurl
 endif
 
+
 ifeq (LIGHTCONE_PARTICLES,$(findstring LIGHTCONE_PARTICLES,$(CONFIGVARS)))
 MAPS_LIBS += -lchealpix -lcfitsio #-lcurl
 endif
-- 
GitLab