From 0ba05b049093b2cb9485f17ed68f33342ca5511b Mon Sep 17 00:00:00 2001
From: Pietro Incardona <incardon@mpi-cbg.de>
Date: Wed, 26 Oct 2016 21:09:53 +0200
Subject: [PATCH] Fixing example compilation optionn for OSX

---
 example/Grid/0_simple/Makefile                          | 2 +-
 example/Grid/1_stencil/Makefile                         | 2 +-
 example/Grid/2_solve_eq/Makefile                        | 2 +-
 example/Grid/3_gray_scott/Makefile                      | 2 +-
 example/Numerics/PSE/0_Derivative_approx_1D/Makefile    | 2 +-
 example/Numerics/PSE/1_Derivative_approx_1D_mp/Makefile | 2 +-
 example/Numerics/PSE/1_Diffusion_1D/Makefile            | 2 +-
 example/Plot/0_simple_graph/Makefile                    | 2 +-
 example/Plot/2_PSE_convergence/Makefile                 | 2 +-
 example/SE/0_classes/Makefile                           | 2 +-
 example/SE/1_classes/Makefile                           | 2 +-
 example/VCluster/0_simple/Makefile                      | 2 +-
 example/Vector/0_simple/Makefile                        | 2 +-
 example/Vector/1_celllist/Makefile                      | 2 +-
 example/Vector/2_expressions/Makefile                   | 2 +-
 install                                                 | 4 +++-
 16 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/example/Grid/0_simple/Makefile b/example/Grid/0_simple/Makefile
index 396531f7..927a794d 100644
--- a/example/Grid/0_simple/Makefile
+++ b/example/Grid/0_simple/Makefile
@@ -7,7 +7,7 @@ LDIR =
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -fext-numeric-literals -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
+	$(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
 
 grid: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Grid/1_stencil/Makefile b/example/Grid/1_stencil/Makefile
index bc66c5ee..12399cc8 100644
--- a/example/Grid/1_stencil/Makefile
+++ b/example/Grid/1_stencil/Makefile
@@ -7,7 +7,7 @@ LDIR =
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -fext-numeric-literals -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
+	$(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
 
 stencil: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Grid/2_solve_eq/Makefile b/example/Grid/2_solve_eq/Makefile
index 7509c7ca..9295477e 100644
--- a/example/Grid/2_solve_eq/Makefile
+++ b/example/Grid/2_solve_eq/Makefile
@@ -7,7 +7,7 @@ LDIR =
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -fext-numeric-literals -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
+	$(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
 
 periodic: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Grid/3_gray_scott/Makefile b/example/Grid/3_gray_scott/Makefile
index 837b8262..df84f0c1 100644
--- a/example/Grid/3_gray_scott/Makefile
+++ b/example/Grid/3_gray_scott/Makefile
@@ -7,7 +7,7 @@ LDIR =
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -fext-numeric-literals -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
+	$(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
 
 gray_scott: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Numerics/PSE/0_Derivative_approx_1D/Makefile b/example/Numerics/PSE/0_Derivative_approx_1D/Makefile
index 24da6b8b..4399591a 100644
--- a/example/Numerics/PSE/0_Derivative_approx_1D/Makefile
+++ b/example/Numerics/PSE/0_Derivative_approx_1D/Makefile
@@ -7,7 +7,7 @@ LDIR =
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -fext-numeric-literals -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
+	$(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
 
 pse_1d: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Numerics/PSE/1_Derivative_approx_1D_mp/Makefile b/example/Numerics/PSE/1_Derivative_approx_1D_mp/Makefile
index ebc14e33..5b88e7d2 100644
--- a/example/Numerics/PSE/1_Derivative_approx_1D_mp/Makefile
+++ b/example/Numerics/PSE/1_Derivative_approx_1D_mp/Makefile
@@ -7,7 +7,7 @@ LDIR =
 OBJ_128 = main_float128.o
 
 %.o: %.cpp
-	$(CC) -O3 -c -fext-numeric-literals --std=c++11 -o $@ $< $(INCLUDE_PATH)
+	$(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
 
 pse_1d_128: $(OBJ_128)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) -lquadmath
diff --git a/example/Numerics/PSE/1_Diffusion_1D/Makefile b/example/Numerics/PSE/1_Diffusion_1D/Makefile
index 241b3dfd..80cc4ffe 100644
--- a/example/Numerics/PSE/1_Diffusion_1D/Makefile
+++ b/example/Numerics/PSE/1_Diffusion_1D/Makefile
@@ -7,7 +7,7 @@ LDIR =
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -fext-numeric-literals -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
+	$(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
 
 diff_1d: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Plot/0_simple_graph/Makefile b/example/Plot/0_simple_graph/Makefile
index cb8e065e..c3cd194b 100644
--- a/example/Plot/0_simple_graph/Makefile
+++ b/example/Plot/0_simple_graph/Makefile
@@ -7,7 +7,7 @@ LDIR =
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -g3 -c --std=c++11 -fext-numeric-literals  -o $@ $< $(INCLUDE_PATH)
+	$(CC) -O3 -g3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
 
 plot: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) -lquadmath
diff --git a/example/Plot/2_PSE_convergence/Makefile b/example/Plot/2_PSE_convergence/Makefile
index 5fc0c0db..40f98bf5 100644
--- a/example/Plot/2_PSE_convergence/Makefile
+++ b/example/Plot/2_PSE_convergence/Makefile
@@ -7,7 +7,7 @@ LDIR =
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -g3 -c --std=c++11 -fext-numeric-literals  -o $@ $< $(INCLUDE_PATH)
+	$(CC) -O3 -g3 -c --std=c++11  -o $@ $< $(INCLUDE_PATH)
 
 conv_p: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) -lquadmath
diff --git a/example/SE/0_classes/Makefile b/example/SE/0_classes/Makefile
index 76eb4ecd..c6ff6d85 100644
--- a/example/SE/0_classes/Makefile
+++ b/example/SE/0_classes/Makefile
@@ -7,7 +7,7 @@ LDIR =
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -fext-numeric-literals -O3 -g3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
+	$(CC) -O3 -g3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
 
 se_classes: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/SE/1_classes/Makefile b/example/SE/1_classes/Makefile
index 76eb4ecd..c6ff6d85 100644
--- a/example/SE/1_classes/Makefile
+++ b/example/SE/1_classes/Makefile
@@ -7,7 +7,7 @@ LDIR =
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -fext-numeric-literals -O3 -g3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
+	$(CC) -O3 -g3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
 
 se_classes: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/VCluster/0_simple/Makefile b/example/VCluster/0_simple/Makefile
index 558b4b35..b54f7e1f 100644
--- a/example/VCluster/0_simple/Makefile
+++ b/example/VCluster/0_simple/Makefile
@@ -7,7 +7,7 @@ LDIR =
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -fext-numeric-literals -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
+	$(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
 
 vcluster: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Vector/0_simple/Makefile b/example/Vector/0_simple/Makefile
index 9afd8418..646357e9 100644
--- a/example/Vector/0_simple/Makefile
+++ b/example/Vector/0_simple/Makefile
@@ -7,7 +7,7 @@ LDIR =
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -fext-numeric-literals -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
+	$(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
 
 vect: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Vector/1_celllist/Makefile b/example/Vector/1_celllist/Makefile
index ada4e5f9..6e6e5296 100644
--- a/example/Vector/1_celllist/Makefile
+++ b/example/Vector/1_celllist/Makefile
@@ -7,7 +7,7 @@ LDIR =
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -fext-numeric-literals -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
+	$(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
 
 cell: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Vector/2_expressions/Makefile b/example/Vector/2_expressions/Makefile
index bfa50d40..a7705b97 100644
--- a/example/Vector/2_expressions/Makefile
+++ b/example/Vector/2_expressions/Makefile
@@ -7,7 +7,7 @@ LDIR =
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -fext-numeric-literals -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
+	$(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
 
 expr: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/install b/install
index f8399eb3..7810a454 100755
--- a/install
+++ b/install
@@ -8,6 +8,7 @@ source script/remove_old
 source script/set_mpi
 source script/conf_PETSC
 
+
 ## Check that your home is not empty
 
 if [ x"$HOME" == x"" ]; then
@@ -308,7 +309,8 @@ fi
 
 ### Create example.mk
 install_base=$(cat install_dir)
-openmp_flags=$(cat openmp_flags) $(cat openfpm_flags)
+openmp_flags="$(cat openmp_flags) $(cat openfpm_flags)"
+
 echo "INCLUDE_PATH= $openmp_flags  -I. -I$install_base/openfpm_numerics/include -I$install_base/openfpm_pdata/include/config -I$install_base/openfpm_pdata/include -I$install_base/openfpm_data/include -I$install_base/openfpm_vcluster/include -I$install_base/openfpm_io/include -I$install_base/openfpm_devices/include -I$i_dir/METIS/include -I$i_dir/PARMETIS/include -I$i_dir/BOOST/include -I$i_dir/HDF5/include -I$i_dir/LIBHILBERT/include  $lin_alg_inc" > example.mk
 echo "LIBS_PATH= $openmp_flags -L$install_base/openfpm_devices/lib -L$install_base/openfpm_pdata/lib  -L$install_base/openfpm_vcluster/lib -L$i_dir/METIS/lib -L$i_dir/PARMETIS/lib  -L$i_dir/BOOST/lib -L$i_dir/HDF5/lib -L$i_dir/LIBHILBERT/lib  $lin_alg_dir" >> example.mk
 echo "LIBS=-lvcluster -lofpm_pdata -lofpmmemory -lparmetis -lmetis -lboost_iostreams -lhdf5 -llibhilbert  $lin_alg_lib" >> example.mk
-- 
GitLab