From 84d092c1b3cda3e0005f3269b5dd3d0d55c099ba Mon Sep 17 00:00:00 2001
From: Emanuele De Rubeis <ederubei@login01.m100.cineca.it>
Date: Tue, 17 Jan 2023 17:44:25 +0100
Subject: [PATCH] New Makefile with CFITSIO implementation

---
 Makefile | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 23d161d..c034046 100644
--- a/Makefile
+++ b/Makefile
@@ -27,14 +27,19 @@ endif
 
 #OPT += -DNVIDIA
 # perform one-side communication (suggested) instead of reduce (only if MPI is active)
-OPT += -DONE_SIDE
+#OPT += -DONE_SIDE
 # write the full 3D cube of gridded visibilities and its FFT transform
 #OPT += -DWRITE_DATA
 # write the final image
 OPT += -DWRITE_IMAGE
 # perform w-stacking phase correction
-OPT += -DPHASE_ON
+#OPT += -DPHASE_ON
+# Support CFITSIO
+OPT += -DFITSIO
 
+ifeq (FITSIO,$(findstring FITSIO,$(OPT)))
+	LIBS += -L$(FITSIO_LIB) -lcfitsio
+endif
 
 DEPS = w-stacking.h w-stacking-fftw.c w-stacking.cu phase_correction.cu
 COBJ = w-stacking.o w-stacking-fftw.o phase_correction.o
-- 
GitLab