diff --git a/example/Grid/0_simple/Makefile b/example/Grid/0_simple/Makefile
index fee751e77effdba3d8a62701126b846528f0fe56..25626ea0d61cc3f78c41ade0833b313f331dd9cc 100644
--- a/example/Grid/0_simple/Makefile
+++ b/example/Grid/0_simple/Makefile
@@ -1,10 +1,10 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -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 fb05ceb3e7baca9c5651b34c4912635f909468f6..4974cff0aaee6b8edb57f2e0352b5745278b8599 100644
--- a/example/Grid/1_stencil/Makefile
+++ b/example/Grid/1_stencil/Makefile
@@ -1,10 +1,10 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -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 aa96c4a2a6801255f2496fdbbd293796c8e04b16..fe74085ee8ae08ff6e93667471bcb318192dec3f 100644
--- a/example/Grid/2_solve_eq/Makefile
+++ b/example/Grid/2_solve_eq/Makefile
@@ -1,10 +1,10 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -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 10392737bf63d18e90ec6c1e3e17b1048f9ea618..87a6dedac5ed28ae5d94f9f1dacd1b929247aa48 100644
--- a/example/Grid/3_gray_scott/Makefile
+++ b/example/Grid/3_gray_scott/Makefile
@@ -1,10 +1,10 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 gray_scott: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Grid/3_gray_scott_3d/Makefile b/example/Grid/3_gray_scott_3d/Makefile
index 702a33fe74d5b8e2bf80bb80121935280cc838cb..87a6dedac5ed28ae5d94f9f1dacd1b929247aa48 100644
--- a/example/Grid/3_gray_scott_3d/Makefile
+++ b/example/Grid/3_gray_scott_3d/Makefile
@@ -1,10 +1,10 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 gray_scott: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Grid/3_gray_scott_3d_vectorization/Makefile b/example/Grid/3_gray_scott_3d_vectorization/Makefile
index f1d92367ef4a3df441d302348343af81b30d1452..cb7f92e3a40961ef8e549e3543d9320885f5d6b9 100644
--- a/example/Grid/3_gray_scott_3d_vectorization/Makefile
+++ b/example/Grid/3_gray_scott_3d_vectorization/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 
 OBJ = main.o update_new.o
@@ -8,7 +8,7 @@ OBJ = main.o update_new.o
 	mpif90 -ffree-line-length-none -fno-range-check -fno-second-underscore  -fimplicit-none  -mavx -O3 -c -g -o $@ $<
 
 %.o: %.cpp
-	$(CC) -O3 -mavx  -g -c --std=c++14 -Wno-ignored-attributes  -o  $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -mavx -c -Wno-ignored-attributes -o  $@ $< $(INCLUDE_PATH)
 
 gray_scott: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Numerics/2D_ActiveFluid/Makefile b/example/Numerics/2D_ActiveFluid/Makefile
index 5a3f92c6b7c135aa687e17032b4706fc9a2e5739..5f5ee5b50285c515a09de1ccd92d2783d7988c69 100644
--- a/example/Numerics/2D_ActiveFluid/Makefile
+++ b/example/Numerics/2D_ActiveFluid/Makefile
@@ -1,10 +1,10 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O0 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 Active2d: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Numerics/Closest_point/0_sphere_redistancing/Makefile b/example/Numerics/Closest_point/0_sphere_redistancing/Makefile
index a1d57e878d9e8e505a5150566debab8965edef7f..268820eb6f0f9cb67004a954d5f3db7f77054dc7 100644
--- a/example/Numerics/Closest_point/0_sphere_redistancing/Makefile
+++ b/example/Numerics/Closest_point/0_sphere_redistancing/Makefile
@@ -4,7 +4,7 @@ include ../../../example.mk
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 all: sphere_redistance
 
diff --git a/example/Numerics/OdeInt/Makefile b/example/Numerics/OdeInt/Makefile
index 063a16b402066fa670792a860df83c4a830c8bf9..f15b71c8184a5f40e10d1a9228987a6d9944e963 100644
--- a/example/Numerics/OdeInt/Makefile
+++ b/example/Numerics/OdeInt/Makefile
@@ -1,11 +1,11 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 OBJ2 = main2.o
 
 %.o: %.cpp
-	$(CC) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 example_odeint: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Numerics/PS-CMA-ES/Makefile b/example/Numerics/PS-CMA-ES/Makefile
index 8650a377d7dad75fa5e54785b710b43a70dd472e..9010b0e865cf7ed8120fb4775e3fd4a5b154f7a7 100644
--- a/example/Numerics/PS-CMA-ES/Makefile
+++ b/example/Numerics/PS-CMA-ES/Makefile
@@ -1,10 +1,10 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -I/usr/local/cuda/include  -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 ps_cma_es: $(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 5a5f90c9f36748b693ad5ddb15909071cb423ea6..e43a95e06f04fd636f9622260726e4fe8afc297c 100644
--- a/example/Numerics/PSE/0_Derivative_approx_1D/Makefile
+++ b/example/Numerics/PSE/0_Derivative_approx_1D/Makefile
@@ -4,7 +4,7 @@ include ../../../example.mk
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -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 2c01f11bd04a8bdebb9d02363a92ad2dbef140cc..3a9a4727edc9d4b26004cf95abf0143820cf486a 100644
--- a/example/Numerics/PSE/1_Derivative_approx_1D_mp/Makefile
+++ b/example/Numerics/PSE/1_Derivative_approx_1D_mp/Makefile
@@ -6,7 +6,7 @@ include ../../../example.mk
 OBJ_128 = main_float128.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -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 faaf9dd0c1e547a31674e6707432515a13ef95eb..42480f1d8101dcde95783d285bfebd7f3535f56a 100644
--- a/example/Numerics/PSE/1_Diffusion_1D/Makefile
+++ b/example/Numerics/PSE/1_Diffusion_1D/Makefile
@@ -4,7 +4,7 @@ include ../../../example.mk
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 diff_1d: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Numerics/Stoke_flow/0_2D_incompressible/Makefile b/example/Numerics/Stoke_flow/0_2D_incompressible/Makefile
index 7dce97679eda4d27fac054148aef294413cc4130..375c8ce07388b0df5eeac080868a24d6f4860672 100644
--- a/example/Numerics/Stoke_flow/0_2D_incompressible/Makefile
+++ b/example/Numerics/Stoke_flow/0_2D_incompressible/Makefile
@@ -5,7 +5,7 @@ OBJ_EIGEN = main_eigen.o
 OBJ_PETSC = main_petsc.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 all: stokes_2d_eigen stokes_2d_petsc
 
diff --git a/example/Numerics/Stoke_flow/1_3D_incompressible/Makefile b/example/Numerics/Stoke_flow/1_3D_incompressible/Makefile
index dd6ad2466f7ebc8b5092084d56e026a08546c3a1..d253ab0bde0816154ffb43b2f859bedfffb06eaf 100644
--- a/example/Numerics/Stoke_flow/1_3D_incompressible/Makefile
+++ b/example/Numerics/Stoke_flow/1_3D_incompressible/Makefile
@@ -5,7 +5,7 @@ OBJ_EIGEN = main_eigen.o
 OBJ_PETSC = main_petsc.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 all: stokes_3d_eigen stokes_3d_petsc
 
diff --git a/example/Numerics/Stoke_flow/2_2D_LidDrivenCavity_PC/Makefile b/example/Numerics/Stoke_flow/2_2D_LidDrivenCavity_PC/Makefile
index 7385de919acb0163936212b96cd6a294988f9706..a68ba6f661dacc8a8ca7fd1411c8d40b9ba6c478 100644
--- a/example/Numerics/Stoke_flow/2_2D_LidDrivenCavity_PC/Makefile
+++ b/example/Numerics/Stoke_flow/2_2D_LidDrivenCavity_PC/Makefile
@@ -5,7 +5,7 @@ OBJ = mainDCPSE.o
 OBJ2 = mainFD.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 DcpseLid: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Numerics/Stoke_flow/3_3D_StokesFlowBall/Makefile b/example/Numerics/Stoke_flow/3_3D_StokesFlowBall/Makefile
index b096d58e398325cd63002909a8076a857c180c62..ec9c833a9277e01faed02563f966423f6bf74ce6 100644
--- a/example/Numerics/Stoke_flow/3_3D_StokesFlowBall/Makefile
+++ b/example/Numerics/Stoke_flow/3_3D_StokesFlowBall/Makefile
@@ -4,7 +4,7 @@ include ../../../example.mk
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 Stokes3dBall: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Numerics/Surface_DCPSE/Bump/Makefile b/example/Numerics/Surface_DCPSE/Bump/Makefile
index 5298d0f7de8a1c0b5c21a53c54c7bddf44c256d7..c69deecb74acb62a076885bcc696c736c3f64d45 100644
--- a/example/Numerics/Surface_DCPSE/Bump/Makefile
+++ b/example/Numerics/Surface_DCPSE/Bump/Makefile
@@ -4,7 +4,7 @@ include ../../../example.mk
 OBJ = Bump.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 Bump: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Numerics/Surface_DCPSE/Bunny/Makefile b/example/Numerics/Surface_DCPSE/Bunny/Makefile
index 6fbbf67679bf7687b00d1092fbfc5180790fb48d..cb805665c5359714b57f3f2eaaa9cf6968d76783 100644
--- a/example/Numerics/Surface_DCPSE/Bunny/Makefile
+++ b/example/Numerics/Surface_DCPSE/Bunny/Makefile
@@ -4,7 +4,7 @@ include ../../../example.mk
 OBJ = Bunny.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 Bunny: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Numerics/Surface_DCPSE/Circle/Makefile b/example/Numerics/Surface_DCPSE/Circle/Makefile
index ed0df10074cd3a0b8111970862986e046da89b34..07c24ff9c386a21c1537c402cfbde928c19b1964 100644
--- a/example/Numerics/Surface_DCPSE/Circle/Makefile
+++ b/example/Numerics/Surface_DCPSE/Circle/Makefile
@@ -5,7 +5,7 @@ OBJ = CircLap.o
 OBJ2=CircPoisson.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 Circ: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Numerics/Surface_DCPSE/Ellipsoid/Makefile b/example/Numerics/Surface_DCPSE/Ellipsoid/Makefile
index c715db5fa4925ed87dd8f4776df505f374223ce0..34f399c35964efb19989015b40ce7d9cd8bced58 100644
--- a/example/Numerics/Surface_DCPSE/Ellipsoid/Makefile
+++ b/example/Numerics/Surface_DCPSE/Ellipsoid/Makefile
@@ -4,7 +4,7 @@ include ../../../example.mk
 OBJ = Ellip.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 Ellipsoid: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Numerics/Surface_DCPSE/Sphere/Makefile b/example/Numerics/Surface_DCPSE/Sphere/Makefile
index 0c4d7712b7e14fd38af05c3b10fe351455b96a62..3ec1e6be112463bd8959cd8be75da194107dc4d4 100644
--- a/example/Numerics/Surface_DCPSE/Sphere/Makefile
+++ b/example/Numerics/Surface_DCPSE/Sphere/Makefile
@@ -5,7 +5,7 @@ OBJ = Sph.o
 OBJ2 = SphBench.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 SphereE: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Numerics/Sussman_redistancing/example_sussman_disk/Makefile b/example/Numerics/Sussman_redistancing/example_sussman_disk/Makefile
index b3952a7e43c4c5281308f7e6a68ed460017ca5e2..ca3a7fe8d52b14a23b951e188672c6af89dc4cf8 100644
--- a/example/Numerics/Sussman_redistancing/example_sussman_disk/Makefile
+++ b/example/Numerics/Sussman_redistancing/example_sussman_disk/Makefile
@@ -4,7 +4,7 @@ include ../../../example.mk
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 example_sussman_disk: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Numerics/Sussman_redistancing/example_sussman_images_2D/Makefile b/example/Numerics/Sussman_redistancing/example_sussman_images_2D/Makefile
index 3746f0a07043b46613de846a4290a2b41ce549cc..41f3ce667ebcd3034b094aa3487f10421590b94e 100644
--- a/example/Numerics/Sussman_redistancing/example_sussman_images_2D/Makefile
+++ b/example/Numerics/Sussman_redistancing/example_sussman_images_2D/Makefile
@@ -4,7 +4,7 @@ include ../../../example.mk
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 example_sussman_images: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Numerics/Sussman_redistancing/example_sussman_images_3D/Makefile b/example/Numerics/Sussman_redistancing/example_sussman_images_3D/Makefile
index 3746f0a07043b46613de846a4290a2b41ce549cc..41f3ce667ebcd3034b094aa3487f10421590b94e 100644
--- a/example/Numerics/Sussman_redistancing/example_sussman_images_3D/Makefile
+++ b/example/Numerics/Sussman_redistancing/example_sussman_images_3D/Makefile
@@ -4,7 +4,7 @@ include ../../../example.mk
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 example_sussman_images: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Numerics/Sussman_redistancing/example_sussman_sphere/Makefile b/example/Numerics/Sussman_redistancing/example_sussman_sphere/Makefile
index b0ba3e14db82ef71bd102967334783815905548f..e8ef1d14abd11cfcbbe62b4203c9cf4b3c9321b6 100644
--- a/example/Numerics/Sussman_redistancing/example_sussman_sphere/Makefile
+++ b/example/Numerics/Sussman_redistancing/example_sussman_sphere/Makefile
@@ -4,7 +4,7 @@ include ../../../example.mk
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 example_sussman_sphere: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Numerics/Vortex_in_cell/Makefile b/example/Numerics/Vortex_in_cell/Makefile
index ca65382328a40fb6a59695be9c7049833850e399..c184ea0837e1c4af0f9b18c3df3639b7f11433b2 100644
--- a/example/Numerics/Vortex_in_cell/Makefile
+++ b/example/Numerics/Vortex_in_cell/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ_VIC_PETSC = main_vic_petsc.o
 OBJ_VIC_PETSC_OPT = main_vic_petsc_opt.o
@@ -10,7 +10,7 @@ vic_petsc_test: OPT += -DTEST_RUN
 vic_petsc_test: vic_petsc vic_petsc_opt
 
 %.o: %.cpp
-	$(CC) -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 vic_petsc_opt: $(OBJ_VIC_PETSC_OPT)
 	$(CC) -o $@ $^ $(LIBS_PATH) $(LIBS)
diff --git a/example/Performance/Nbody_benchmark/Makefile b/example/Performance/Nbody_benchmark/Makefile
index d3033f6c8350519f4e2ebc62580207cb7b145bbd..05e594bb3b2d9e62362f0e804b4e8dccb4f57378 100644
--- a/example/Performance/Nbody_benchmark/Makefile
+++ b/example/Performance/Nbody_benchmark/Makefile
@@ -1,15 +1,15 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 nbody:
 
 %.o: %.cu
-	$(CUDA_CC) -O3 $(CUDA_OPTIONS) $(OPT) -c --std=c++14  -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 %.o: %.cpp
-	$(CC) -g -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 nbody: $(OBJ)
 	$(CUDA_CC_LINK) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT)
diff --git a/example/Performance/Syncthreads_kokkos_benchmark/Makefile b/example/Performance/Syncthreads_kokkos_benchmark/Makefile
index ed3ab68e069fbe6358c141c14de66a9287f164f3..b128483d519b4412e35be354db4f6ec4807c0a40 100644
--- a/example/Performance/Syncthreads_kokkos_benchmark/Makefile
+++ b/example/Performance/Syncthreads_kokkos_benchmark/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
@@ -8,10 +8,10 @@ sync_dlb_test: sync_dlb
 
 cuda:
 %.o: %.cu
-	$(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS)  -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 %.o: %.cpp
-	$(CC) -O0 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 cuda: $(OBJ)
 	$(CUDA_CC_LINK) -o  $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT)
diff --git a/example/Performance/memBW/Makefile b/example/Performance/memBW/Makefile
index 974224d008e164efb27596495c3bb0e64378feaf..e32c4305313ab21fcf815418bb0e663b21f6f89d 100644
--- a/example/Performance/memBW/Makefile
+++ b/example/Performance/memBW/Makefile
@@ -1,15 +1,15 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 memBW:
 
 %.o: %.cu
-	$(CUDA_CC) -O3 $(CUDA_OPTIONS) $(OPT) -c --std=c++14  -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 %.o: %.cpp
-	$(CC) -g -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 memBW: $(OBJ)
 	$(CUDA_CC_LINK) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT)
diff --git a/example/Performance/memBW_multi/Makefile b/example/Performance/memBW_multi/Makefile
index a8f60ed2bf2e52d8d218cab61b8f161fa6e14357..e65fd07fe4d821311722977cdc7dd900c125980c 100644
--- a/example/Performance/memBW_multi/Makefile
+++ b/example/Performance/memBW_multi/Makefile
@@ -1,15 +1,15 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 memBW:
 
 %.o: %.cu
-	$(CUDA_CC) -O3 -g  $(CUDA_OPTIONS) $(OPT) -c --std=c++14  -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 %.o: %.cpp
-	$(CC) -g -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 memBW: $(OBJ)
 	$(CUDA_CC_LINK) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT)
diff --git a/example/Performance/miniBUDE/Makefile b/example/Performance/miniBUDE/Makefile
index 7cc2d1fa09db307561ddf351f41a7e6d9be2b9eb..ae23f6132dfd34deeff0e63bb3467472e0c927d1 100644
--- a/example/Performance/miniBUDE/Makefile
+++ b/example/Performance/miniBUDE/Makefile
@@ -1,15 +1,15 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 miniBUDE:
 
 %.o: %.cu
-	$(CUDA_CC) -O3 $(CUDA_OPTIONS) $(OPT) -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 %.o: %.cpp
-	$(CC) -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 miniBUDE: $(OBJ)
 	$(CUDA_CC_LINK) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT)
diff --git a/example/Plot/0_simple_graph/Makefile b/example/Plot/0_simple_graph/Makefile
index 444776c38cec2ebe039a3475f91f0ca066a217b6..1676ac40ddaca192cf1a4e7d0c0ed44d1fd76f83 100644
--- a/example/Plot/0_simple_graph/Makefile
+++ b/example/Plot/0_simple_graph/Makefile
@@ -1,10 +1,10 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -g3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 plot: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Plot/2_PSE_convergence/Makefile b/example/Plot/2_PSE_convergence/Makefile
index b6256493979a7e5e0157f8a18238de4c2d1ef01f..fec4a3090c5653bc4bad68c81efe436a33459b83 100644
--- a/example/Plot/2_PSE_convergence/Makefile
+++ b/example/Plot/2_PSE_convergence/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 #### this example work only if you have quadmath activated ###
 #### (only if -lquadmath work) uncomment to reactivate 
@@ -7,7 +7,7 @@ include ../../example.mk
 #OBJ = main.o
 
 #%.o: %.cpp
-#	$(CC) -O3 -g3 -c --std=c++11  -o $@ $< $(INCLUDE_PATH)
+# 	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 #conv_p: $(OBJ)
 #	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) -lquadmath
diff --git a/example/SparseGrid/10_heat_conduction_reticulate_porous_ceramics/Makefile b/example/SparseGrid/10_heat_conduction_reticulate_porous_ceramics/Makefile
index 84437da25fcce9e2d804cbccfd9313a36347417a..805bd05f3441f4f9093931aaf39aa1f9bc5e97e2 100644
--- a/example/SparseGrid/10_heat_conduction_reticulate_porous_ceramics/Makefile
+++ b/example/SparseGrid/10_heat_conduction_reticulate_porous_ceramics/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 DATA = reactiondiffusion_imagebased_porousmedia-main.tar.gz
@@ -16,7 +16,7 @@ $(DATA):
 	rm -rf reactiondiffusion_imagebased_porousmedia-main/
 
 %.o: %.cu
-	$(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 heat_ceram: $(OBJ) $(DATA)
 	$(CUDA_CC_LINK) -o $@ $(OBJ) $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT)
diff --git a/example/SparseGrid/1_gray_scott_3d_sparse/Makefile b/example/SparseGrid/1_gray_scott_3d_sparse/Makefile
index bf9004bbd6b0a693ba9b298d6509a4e410957f42..3f087db436a21cce8eb68035cb345074a192fe1b 100644
--- a/example/SparseGrid/1_gray_scott_3d_sparse/Makefile
+++ b/example/SparseGrid/1_gray_scott_3d_sparse/Makefile
@@ -1,12 +1,12 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 gray_scott_sparse_test: OPT += -DTEST_RUN
 gray_scott_sparse_test: gray_scott_sparse
 
 %.o: %.cpp
-	$(CC) -O3 -g $(OPT) -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 gray_scott_sparse: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/SparseGrid/1_gray_scott_3d_sparse_gpu/Makefile b/example/SparseGrid/1_gray_scott_3d_sparse_gpu/Makefile
index 9adb3283a3762d32fc689aad737dcc8f002a4968..35017418480273e15217d39ebb21fdd7ac06c891 100644
--- a/example/SparseGrid/1_gray_scott_3d_sparse_gpu/Makefile
+++ b/example/SparseGrid/1_gray_scott_3d_sparse_gpu/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
@@ -7,7 +7,7 @@ gray_scott_sparse_gpu_test: OPT += -DTEST_RUN
 gray_scott_sparse_gpu_test: gray_scott_sparse_gpu
 
 %.o: %.cu
-	$(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 gray_scott_sparse_gpu: $(OBJ)
 	$(CUDA_CC_LINK) -o $@ $^ $(LIBS_PATH) $(LIBS_SELECT)
diff --git a/example/SparseGrid/2_gray_scott_3d_sparse_gpu_opt/Makefile b/example/SparseGrid/2_gray_scott_3d_sparse_gpu_opt/Makefile
index 619f8d3fe1b0f1e5e2638284f0027e8b82cdd64c..cadfc5b8780463fe31c1eaef00131b2174b59c1c 100644
--- a/example/SparseGrid/2_gray_scott_3d_sparse_gpu_opt/Makefile
+++ b/example/SparseGrid/2_gray_scott_3d_sparse_gpu_opt/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 gray_scott_sparse_gpu_test: OPT += -DTEST_RUN
 gray_scott_sparse_gpu_test: gray_scott_sparse_gpu
@@ -7,7 +7,7 @@ gray_scott_sparse_gpu_test: gray_scott_sparse_gpu
 OBJ = main.o
 
 %.o: %.cu
-	$(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 gray_scott_sparse_gpu: $(OBJ)
 	$(CUDA_CC_LINK) -o $@ $^ $(LIBS_PATH) $(LIBS_SELECT)
diff --git a/example/SparseGrid/2_gray_scott_3d_sparse_opt/Makefile b/example/SparseGrid/2_gray_scott_3d_sparse_opt/Makefile
index 800a9b2197eded993edf45c51bfc5eb528b5b0b6..1079b2de5477267d963d7e06d48dfea24f1d5f38 100644
--- a/example/SparseGrid/2_gray_scott_3d_sparse_opt/Makefile
+++ b/example/SparseGrid/2_gray_scott_3d_sparse_opt/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 
 OBJ = main.o
@@ -8,7 +8,7 @@ gray_scott_sparse_opt_test: OPT += -DTEST_RUN
 gray_scott_sparse_opt_test: gray_scott_sparse_opt
 
 %.o: %.cpp
-	$(CC) -mavx -O3 -g $(OPT) -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) -mavx -$(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 gray_scott_sparse_opt: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/SparseGrid/3_gray_scott_3d_sparse_cs/Makefile b/example/SparseGrid/3_gray_scott_3d_sparse_cs/Makefile
index e329d7169f36747ed5fc35108cb765eacb99e31b..9d3e164959c94e5c2408e3a64928e584583d981b 100644
--- a/example/SparseGrid/3_gray_scott_3d_sparse_cs/Makefile
+++ b/example/SparseGrid/3_gray_scott_3d_sparse_cs/Makefile
@@ -1,12 +1,12 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 gray_scott_sparse_cs_test: OPT += -DTEST_RUN
 gray_scott_sparse_cs_test: gray_scott_sparse_cs
 
 %.o: %.cpp
-	$(CC) -O3 -g $(OPT) -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 gray_scott_sparse_cs: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/SparseGrid/3_gray_scott_3d_sparse_gpu_cs/Makefile b/example/SparseGrid/3_gray_scott_3d_sparse_gpu_cs/Makefile
index 07f57b0b4c30e9a6cc3bc21bb3c07bbd834332b4..35017418480273e15217d39ebb21fdd7ac06c891 100644
--- a/example/SparseGrid/3_gray_scott_3d_sparse_gpu_cs/Makefile
+++ b/example/SparseGrid/3_gray_scott_3d_sparse_gpu_cs/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
@@ -7,7 +7,7 @@ gray_scott_sparse_gpu_test: OPT += -DTEST_RUN
 gray_scott_sparse_gpu_test: gray_scott_sparse_gpu
 
 %.o: %.cu
-	$(CUDA_CC) $(OPT) $(CUDA_OPTIONS) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 gray_scott_sparse_gpu: $(OBJ)
 	$(CUDA_CC_LINK) -o $@ $^ $(LIBS_PATH) $(LIBS_SELECT)
diff --git a/example/SparseGrid/3_gray_scott_3d_sparse_gpu_cs_opt/Makefile b/example/SparseGrid/3_gray_scott_3d_sparse_gpu_cs_opt/Makefile
index 07f57b0b4c30e9a6cc3bc21bb3c07bbd834332b4..35017418480273e15217d39ebb21fdd7ac06c891 100644
--- a/example/SparseGrid/3_gray_scott_3d_sparse_gpu_cs_opt/Makefile
+++ b/example/SparseGrid/3_gray_scott_3d_sparse_gpu_cs_opt/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
@@ -7,7 +7,7 @@ gray_scott_sparse_gpu_test: OPT += -DTEST_RUN
 gray_scott_sparse_gpu_test: gray_scott_sparse_gpu
 
 %.o: %.cu
-	$(CUDA_CC) $(OPT) $(CUDA_OPTIONS) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 gray_scott_sparse_gpu: $(OBJ)
 	$(CUDA_CC_LINK) -o $@ $^ $(LIBS_PATH) $(LIBS_SELECT)
diff --git a/example/SparseGrid/4_gray_scott_3d_sparse_surface_cs/Makefile b/example/SparseGrid/4_gray_scott_3d_sparse_surface_cs/Makefile
index 63186e0b78732a42e98aa66b81a13c997615dd1e..9aa2c2794cd6c57f86763509e57f2f0e8f9ced32 100644
--- a/example/SparseGrid/4_gray_scott_3d_sparse_surface_cs/Makefile
+++ b/example/SparseGrid/4_gray_scott_3d_sparse_surface_cs/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 
 OBJ = main.o
@@ -7,7 +7,7 @@ gray_scott_sparse_cs_surface: OPT += -DTEST_RUN
 gray_scott_sparse_cs_surface: gray_scott_sparse_surface_cs
 
 %.o: %.cpp
-	$(CC) -O3 -g $(OPT) -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 gray_scott_sparse_surface_cs: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/SparseGrid/5_gray_scott_3d_surface_cs_opt/Makefile b/example/SparseGrid/5_gray_scott_3d_surface_cs_opt/Makefile
index c4688e43330aee0fd2ee643b1f47413b7c1ccd4d..991fd0ac891daa92b8a22c59e89f7a8adab828fa 100644
--- a/example/SparseGrid/5_gray_scott_3d_surface_cs_opt/Makefile
+++ b/example/SparseGrid/5_gray_scott_3d_surface_cs_opt/Makefile
@@ -1,12 +1,12 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 gray_scott_sparse_surface_cs_test: OPT += -DTEST_RUN
 gray_scott_sparse_surface_cs_test: gray_scott_sparse_surface_cs
 
 %.o: %.cpp
-	$(CC) -O3 -g $(OPT) -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 gray_scott_sparse_surface_cs: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/SparseGrid/6_gray_scott_3d_sparse_gpu_opt_weak_scal/Makefile b/example/SparseGrid/6_gray_scott_3d_sparse_gpu_opt_weak_scal/Makefile
index 9adb3283a3762d32fc689aad737dcc8f002a4968..35017418480273e15217d39ebb21fdd7ac06c891 100644
--- a/example/SparseGrid/6_gray_scott_3d_sparse_gpu_opt_weak_scal/Makefile
+++ b/example/SparseGrid/6_gray_scott_3d_sparse_gpu_opt_weak_scal/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
@@ -7,7 +7,7 @@ gray_scott_sparse_gpu_test: OPT += -DTEST_RUN
 gray_scott_sparse_gpu_test: gray_scott_sparse_gpu
 
 %.o: %.cu
-	$(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 gray_scott_sparse_gpu: $(OBJ)
 	$(CUDA_CC_LINK) -o $@ $^ $(LIBS_PATH) $(LIBS_SELECT)
diff --git a/example/SparseGrid/7_gray_scott_3d_sparse_gpu_sphere_expanding/Makefile b/example/SparseGrid/7_gray_scott_3d_sparse_gpu_sphere_expanding/Makefile
index feac80b736418a50969dc4871493ff06c5cffd3d..ea08cfea6aba295af5e00984365e90d565b31396 100644
--- a/example/SparseGrid/7_gray_scott_3d_sparse_gpu_sphere_expanding/Makefile
+++ b/example/SparseGrid/7_gray_scott_3d_sparse_gpu_sphere_expanding/Makefile
@@ -1,10 +1,10 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 %.o: %.cu
-	$(CUDA_CC) $(OPT) $(CUDA_OPTIONS) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 gray_scott_sparse_gpu: $(OBJ)
 	$(CUDA_CC_LINK) -o $@ $^ $(LIBS_PATH) $(LIBS_SELECT)
diff --git a/example/SparseGrid/8_filling_benchmark/Makefile b/example/SparseGrid/8_filling_benchmark/Makefile
index 040b3fdb1c9c11ca3fcdae0bb67a92b7abdc7336..2c364f93146a8d57ebbb79bd719899b5ba18835c 100644
--- a/example/SparseGrid/8_filling_benchmark/Makefile
+++ b/example/SparseGrid/8_filling_benchmark/Makefile
@@ -1,12 +1,12 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 gray_scott_sparse_opt_test: OPT += -DTEST_RUN
 gray_scott_sparse_opt_test: gray_scott_sparse_opt
 
 %.o: %.cpp
-	$(CC) -mavx -O3 -g $(OPT) -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) -mavx $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 gray_scott_sparse_opt: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/SparseGrid/8_filling_benchmark_gpu/Makefile b/example/SparseGrid/8_filling_benchmark_gpu/Makefile
index 619f8d3fe1b0f1e5e2638284f0027e8b82cdd64c..cadfc5b8780463fe31c1eaef00131b2174b59c1c 100644
--- a/example/SparseGrid/8_filling_benchmark_gpu/Makefile
+++ b/example/SparseGrid/8_filling_benchmark_gpu/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 gray_scott_sparse_gpu_test: OPT += -DTEST_RUN
 gray_scott_sparse_gpu_test: gray_scott_sparse_gpu
@@ -7,7 +7,7 @@ gray_scott_sparse_gpu_test: gray_scott_sparse_gpu
 OBJ = main.o
 
 %.o: %.cu
-	$(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 gray_scott_sparse_gpu: $(OBJ)
 	$(CUDA_CC_LINK) -o $@ $^ $(LIBS_PATH) $(LIBS_SELECT)
diff --git a/example/SparseGrid/9_inhomogeneous_diffusion_porous_catalyst_CaCO3/Makefile b/example/SparseGrid/9_inhomogeneous_diffusion_porous_catalyst_CaCO3/Makefile
index f5b06ead647141b1c300886c6a04492f668c5830..133703ff97fc621b3cc60bcf07b93c37ef3fab2c 100644
--- a/example/SparseGrid/9_inhomogeneous_diffusion_porous_catalyst_CaCO3/Makefile
+++ b/example/SparseGrid/9_inhomogeneous_diffusion_porous_catalyst_CaCO3/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 DATA = reactiondiffusion_imagebased_porousmedia-main.tar.gz
@@ -16,7 +16,7 @@ $(DATA):
 	rm -rf reactiondiffusion_imagebased_porousmedia-main/
 
 %.o: %.cu
-	$(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 diff_CaCO3: $(OBJ) $(DATA)
 	$(CUDA_CC_LINK) -o $@ $(OBJ) $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT)
diff --git a/example/VCluster/0_simple/Makefile b/example/VCluster/0_simple/Makefile
index a8481189a2132e20c3779eadf82e421eb763b2bc..95a283c5e064131edfe074a7d1f5075f971f0377 100644
--- a/example/VCluster/0_simple/Makefile
+++ b/example/VCluster/0_simple/Makefile
@@ -1,10 +1,10 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 vcluster: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/VCluster/1_semantic/Makefile b/example/VCluster/1_semantic/Makefile
index 7bd6612ecfca6fbcb6ea96dac025e20a363af0f7..95a283c5e064131edfe074a7d1f5075f971f0377 100644
--- a/example/VCluster/1_semantic/Makefile
+++ b/example/VCluster/1_semantic/Makefile
@@ -1,10 +1,10 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 vcluster: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/VCluster/2_serial_and_parallel/Makefile b/example/VCluster/2_serial_and_parallel/Makefile
index 0aa3d7cc8d6492242aba4a12d24999209fc7b9fb..163dd1d96438b230eb07a40a58a893e2b0e25476 100644
--- a/example/VCluster/2_serial_and_parallel/Makefile
+++ b/example/VCluster/2_serial_and_parallel/Makefile
@@ -1,10 +1,10 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 serial_parallel: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Vector/0_simple/Makefile b/example/Vector/0_simple/Makefile
index aea6cc569672d671689873696c17a584eacc8373..5630d6645bf92cc9890231a43d13333e52a9d951 100644
--- a/example/Vector/0_simple/Makefile
+++ b/example/Vector/0_simple/Makefile
@@ -1,10 +1,10 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O0 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 vect: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Vector/1_HDF5_save_load/Makefile b/example/Vector/1_HDF5_save_load/Makefile
index 458d9e3d73e005cf137e06a2ac5db65e6711f338..491d19c22cd5d33d7d7ddd9e692583522cdb7c5d 100644
--- a/example/Vector/1_HDF5_save_load/Makefile
+++ b/example/Vector/1_HDF5_save_load/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
@@ -7,7 +7,7 @@ all: hdf5
 
 
 %.o: %.cpp
-	$(CC) -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 hdf5: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Vector/1_celllist/Makefile b/example/Vector/1_celllist/Makefile
index 326da57f54f5b3cb9edb57e8d9543a86b94a6d82..781c646968f35fda5d01075e0bc77c3af3e29ab7 100644
--- a/example/Vector/1_celllist/Makefile
+++ b/example/Vector/1_celllist/Makefile
@@ -1,10 +1,10 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 cell: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Vector/1_ghost_get_put/Makefile b/example/Vector/1_ghost_get_put/Makefile
index 8e9e901dd6a5e8612176b2ae52df0775da5f5ca3..795964a14750bdb07553889e31ef116ef8e62cee 100644
--- a/example/Vector/1_ghost_get_put/Makefile
+++ b/example/Vector/1_ghost_get_put/Makefile
@@ -1,10 +1,10 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 ghost: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Vector/1_gpu_first_step/Makefile b/example/Vector/1_gpu_first_step/Makefile
index a3d5f7929715f55e40588f276934fd638225ea2f..1fb6fd22783e4676c4d924e045761389aa66b733 100644
--- a/example/Vector/1_gpu_first_step/Makefile
+++ b/example/Vector/1_gpu_first_step/Makefile
@@ -1,15 +1,15 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 gpu_fstep:
 
 %.o: %.cu
-	$(CUDA_CC) -O3 -g $(CUDA_OPTIONS) -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 %.o: %.cpp
-	$(CC) -O3 $(OPT) -g -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 gpu_fstep: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT)
diff --git a/example/Vector/2_expressions/Makefile b/example/Vector/2_expressions/Makefile
index 9474b9b732f16c63ff4dd75b4cf7195e80490b14..d4c9c4409abcdec965068bacbf180322557b31c3 100644
--- a/example/Vector/2_expressions/Makefile
+++ b/example/Vector/2_expressions/Makefile
@@ -1,10 +1,10 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 expr: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Vector/3_molecular_dynamic/Makefile b/example/Vector/3_molecular_dynamic/Makefile
index 6f3a26f0e2b9444113dfd5b7686b92c9ac9ac564..31c5e5e2a02b4b819473ab97b3c6e507e753cec5 100644
--- a/example/Vector/3_molecular_dynamic/Makefile
+++ b/example/Vector/3_molecular_dynamic/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 OBJ_EXPR = main_expr.o
@@ -9,7 +9,7 @@ OBJ_EXPR_PAP = main_expr_paper.o
 all: md_dyn md_dyn_expr md_dyn_vl md_dyn_pap
 
 %.o: %.cpp
-	$(CC) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 md_dyn: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Vector/3_molecular_dynamic_gpu/Makefile b/example/Vector/3_molecular_dynamic_gpu/Makefile
index eaa8cc2064d682d496d668c6f4559f92b60728fe..dd525c6d5313a86efa1da6f27548728f91397762 100644
--- a/example/Vector/3_molecular_dynamic_gpu/Makefile
+++ b/example/Vector/3_molecular_dynamic_gpu/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
@@ -9,7 +9,7 @@ md_dyn_test: OPT += -DTEST_RUN
 md_dyn_test: md_dyn
 
 %.o: %.cu
-	$(CUDA_CC) $(OPT) $(CUDA_OPTIONS) -O3 -g -c  --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 md_dyn: $(OBJ)
 	$(CUDA_CC_LINK) -o $@ $^ $(LIBS_PATH) $(LIBS_SELECT)
diff --git a/example/Vector/3_molecular_dynamic_gpu_opt/Makefile b/example/Vector/3_molecular_dynamic_gpu_opt/Makefile
index be132bd959d9252ca8eaae6a745c5665be60c7a7..a313cee6664b92b048477fb5efabde4ffe20581b 100644
--- a/example/Vector/3_molecular_dynamic_gpu_opt/Makefile
+++ b/example/Vector/3_molecular_dynamic_gpu_opt/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ_GPU = main_gpu.o
 OBJ_CPU = main_cpu.o
@@ -11,10 +11,10 @@ md_dyn_gpu_test: OPT += -DTEST_RUN
 md_dyn_gpu_test: all
 
 %.o: %.cu
-	$(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS)  -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 %.o: %.cpp
-	$(CC) $(OPT) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 md_dyn_gpu: $(OBJ_GPU)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Vector/4_complex_prop/Makefile b/example/Vector/4_complex_prop/Makefile
index e1264351555e60b24b1ccb45e9d52dfa9c4d4466..fd6cce5739cabc3f28550402cbad0dd0763184e8 100644
--- a/example/Vector/4_complex_prop/Makefile
+++ b/example/Vector/4_complex_prop/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 OBJ_SER = main_ser.o
@@ -7,7 +7,7 @@ OBJ_SER = main_ser.o
 all: vect_cp vect_ser
 
 %.o: %.cpp
-	$(CC) -O3 -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 vect_cp: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Vector/4_multiphase_celllist_verlet/Makefile b/example/Vector/4_multiphase_celllist_verlet/Makefile
index be886b092d2c0aa5ea34d1915263dff568643222..fec6cb98e0e0e9b8551f4ad3835a1fae069c0b5e 100644
--- a/example/Vector/4_multiphase_celllist_verlet/Makefile
+++ b/example/Vector/4_multiphase_celllist_verlet/Makefile
@@ -1,10 +1,10 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 %.o: %.cpp
-	$(CC) -O3 -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 multip: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Vector/4_reorder/Makefile b/example/Vector/4_reorder/Makefile
index e4a50cab8136148ebad151b9f64eaf68764e42e9..6e34abf4fc0f044a2727565662a63bdbcf745ab5 100644
--- a/example/Vector/4_reorder/Makefile
+++ b/example/Vector/4_reorder/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ_DORD = main_data_ord.o
 OBJ_CORD = main_comp_ord.o
@@ -9,7 +9,7 @@ all_test: OPT += -DTEST_RUN
 all_test: md_data_ord_test md_comp_ord_test
 
 %.o: %.cpp
-	$(CC) -O3 -g -c --std=c++14 $(OPT) -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 md_data_ord: $(OBJ_DORD)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Vector/5_molecular_dynamic_sym/Makefile b/example/Vector/5_molecular_dynamic_sym/Makefile
index 8f964a97542d61aff13f5eda4a46cb81787e953e..7202d828399a49d0a16c1d782f0bfbcd4652c48e 100644
--- a/example/Vector/5_molecular_dynamic_sym/Makefile
+++ b/example/Vector/5_molecular_dynamic_sym/Makefile
@@ -1,12 +1,12 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ_DORD = main.o
 
 all: md_sym
 
 %.o: %.cpp
-	$(CC) -O3 -g -c --std=c++14 $(OPT) -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 md_sym: $(OBJ_DORD)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Vector/5_molecular_dynamic_sym_crs/Makefile b/example/Vector/5_molecular_dynamic_sym_crs/Makefile
index 8f964a97542d61aff13f5eda4a46cb81787e953e..7202d828399a49d0a16c1d782f0bfbcd4652c48e 100644
--- a/example/Vector/5_molecular_dynamic_sym_crs/Makefile
+++ b/example/Vector/5_molecular_dynamic_sym_crs/Makefile
@@ -1,12 +1,12 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ_DORD = main.o
 
 all: md_sym
 
 %.o: %.cpp
-	$(CC) -O3 -g -c --std=c++14 $(OPT) -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 md_sym: $(OBJ_DORD)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Vector/6_complex_usage/Makefile b/example/Vector/6_complex_usage/Makefile
index c961e4c42898792d31cd27807679dfb730b3b644..a4de2b3d428820be20532ce2bfdf20a838ee1850 100644
--- a/example/Vector/6_complex_usage/Makefile
+++ b/example/Vector/6_complex_usage/Makefile
@@ -1,12 +1,12 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ_DORD = main.o
 
 all: complex_use
 
 %.o: %.cpp
-	$(CC) -O3 -g -c --std=c++14 $(OPT) -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 complex_use: $(OBJ_DORD)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Vector/7_SPH_dlb/Makefile b/example/Vector/7_SPH_dlb/Makefile
index 4da261b6d603eb0f853c49ca3faefada3a1a3c2a..33544bcc7f390bc3ebe212a445ba786f37dd31fa 100644
--- a/example/Vector/7_SPH_dlb/Makefile
+++ b/example/Vector/7_SPH_dlb/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
@@ -8,7 +8,7 @@ sph_dlb_test: OPT += -DTEST_RUN
 sph_dlb_test: sph_dlb
 
 %.o: %.cpp
-	$(CC) -O3 -g  $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 sph_dlb: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Vector/7_SPH_dlb_gpu/Makefile b/example/Vector/7_SPH_dlb_gpu/Makefile
index f4819a42cddaa665ca3c60a7d2a91a9a68c4a567..46ae11f7ac7c9f54cd410b03977878ab6217d8b7 100644
--- a/example/Vector/7_SPH_dlb_gpu/Makefile
+++ b/example/Vector/7_SPH_dlb_gpu/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
@@ -8,10 +8,10 @@ sph_dlb_test: OPT += -DTEST_RUN
 sph_dlb_test: sph_dlb
 
 %.o: %.cu
-	$(CUDA_CC) $(CUDA_OPTIONS) $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 %.o: %.cpp
-	$(CC) -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 sph_dlb: $(OBJ)
 	$(CUDA_CC_LINK) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT)
diff --git a/example/Vector/7_SPH_dlb_gpu_more_opt/Makefile b/example/Vector/7_SPH_dlb_gpu_more_opt/Makefile
index c9728dac80440076fe382b461273e2cbed196ffd..98181a60cea417ce09d60d0d73314d6977025a07 100644
--- a/example/Vector/7_SPH_dlb_gpu_more_opt/Makefile
+++ b/example/Vector/7_SPH_dlb_gpu_more_opt/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
@@ -8,10 +8,10 @@ sph_dlb_test: OPT += -DTEST_RUN
 sph_dlb_test: sph_dlb
 
 %.o: %.cu
-	$(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS)  -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 %.o: %.cpp
-	$(CC) -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 sph_dlb: $(OBJ)
 	$(CUDA_CC_LINK) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT)
diff --git a/example/Vector/7_SPH_dlb_gpu_opt/Makefile b/example/Vector/7_SPH_dlb_gpu_opt/Makefile
index a366434601ea87b90be060e773abf8ab2ad40e6e..5f3c3d22da0249b9e7a4a5e755418dd5e7af16cc 100644
--- a/example/Vector/7_SPH_dlb_gpu_opt/Makefile
+++ b/example/Vector/7_SPH_dlb_gpu_opt/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
@@ -8,10 +8,10 @@ sph_dlb_test: OPT += -DTEST_RUN
 sph_dlb_test: sph_dlb
 
 %.o: %.cu
-	$(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS)  -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 %.o: %.cpp
-	$(CC) -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 sph_dlb: $(OBJ)
 	$(CUDA_CC_LINK) -o  $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT)
diff --git a/example/Vector/7_SPH_dlb_opt/Makefile b/example/Vector/7_SPH_dlb_opt/Makefile
index d190bf27bc913399ceb89e9cc0ca9f8fbc23b67b..9e97ce5e6510a094dd4f575db1f84eead1f1be4b 100644
--- a/example/Vector/7_SPH_dlb_opt/Makefile
+++ b/example/Vector/7_SPH_dlb_opt/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
@@ -9,7 +9,7 @@ sph_dlb_test: OPT += -DTEST_RUN
 sph_dlb_test: sph_dlb
 
 %.o: %.cpp
-	$(CC) -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 sph_dlb: $(OBJ)
 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Vector/8_DEM/Makefile b/example/Vector/8_DEM/Makefile
index 3857b0510b8afdde4057ea0d2fe04cbdf26aa9ab..5a4f3f665e6d547d741257ca9ee042cf834d0d5d 100644
--- a/example/Vector/8_DEM/Makefile
+++ b/example/Vector/8_DEM/Makefile
@@ -1,5 +1,5 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
@@ -9,7 +9,7 @@ dem_test: OPT += -DTEST_RUN
 dem_test: all
 
 %.o: %.cpp
-	$(CC) -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 dem: $(OBJ)
 	$(CC) -o $@ $^ $(OPT) $(CFLAGS) $(LIBS_PATH) $(LIBS)
diff --git a/example/Vector/9_gpu_cuda_interop/Makefile b/example/Vector/9_gpu_cuda_interop/Makefile
index 30c93e541316d79c8660ad8a476a07bdac2cd52c..d7bea3e0dd89dbaf123072db2c5c3e6b8994c294 100644
--- a/example/Vector/9_gpu_cuda_interop/Makefile
+++ b/example/Vector/9_gpu_cuda_interop/Makefile
@@ -1,15 +1,15 @@
-include ../../common.mk
 include ../../example.mk
+include ../../common.mk
 
 OBJ = main.o
 
 gpu_interop:
 
 %.o: %.cu
-	$(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH_NVCC)
+	$(CUDA_CC) $(CUDA_OPTIONS) -c -o $@ $< $(INCLUDE_PATH_NVCC)
 
 %.o: %.cpp
-	$(CC) -O3 $(OPT) -g -c --std=c++14 -o $@ $< $(INCLUDE_PATH)
+	$(CC) $(OPT) -c -o $@ $< $(INCLUDE_PATH)
 
 gpu_interop: $(OBJ)
 	$(CUDA_CC_LINK) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SELECT)
diff --git a/example/common.mk b/example/common.mk
index 85ce5519c2294a9e7ccc2319bdb894520ba0058a..a6a536b74f3af3b838e328152a7fe33e699b18c2 100644
--- a/example/common.mk
+++ b/example/common.mk
@@ -1,4 +1,5 @@
 # SET ENVIRONMENT VARIABLES ACCORDING TO ONE OF THE SUPPORTED MODES (cpu, gpu-nvcc, gpu-hip, gpu-emulated (CUDA_ON_CPU))
+# openfpm installed and the gpu examples have to be compiled in the same mode (i.e. via nvcc, hip or gpu-emulated (CUDA_ON_CPU))
 
 ### This is a trick to avoid "Command not found if you no not have NVCC compiler". In practice the normal C++ compiler is used
 ### internally the example disable with the preprocessor its code if not compiled with nvcc 
@@ -7,29 +8,30 @@ CUDA_CC_LINK=
 
 ifdef HIP
     CUDA_CC=hipcc
-    CUDA_OPTIONS=-D__NVCC__ -D__HIP__ -DCUDART_VERSION=11000 -D__CUDACC__ -D__CUDACC_VER_MAJOR__=11 -D__CUDACC_VER_MINOR__=0 -D__CUDACC_VER_BUILD__=0
+    CUDA_OPTIONS=-O3 --std=c++14 -D__NVCC__ -D__HIP__ -DCUDART_VERSION=11000 -D__CUDACC__ -D__CUDACC_VER_MAJOR__=11 -D__CUDACC_VER_MINOR__=0 -D__CUDACC_VER_BUILD__=0
     LIBS_SELECT=$(LIBS)
     CC=hipcc
     CUDA_CC_LINK=hipcc
 else
     CC=mpic++
     ifdef CUDA_ON_CPU
-        CUDA_CC=mpic++ -x c++ $(INCLUDE_PATH)
-        INCLUDE_PATH_NVCC=
+        CUDA_CC=mpic++ -x c++
+        INCLUDE_PATH_NVCC=$(INCLUDE_PATH)
         CUDA_CC_LINK=mpic++
-        CUDA_OPTIONS=-D__NVCC__ -DCUDART_VERSION=11000
-        LIBS_SELECT=$(LIBS)
+        CUDA_OPTIONS=-O3 --std=c++14 -D__NVCC__ -DCUDART_VERSION=11000
+        LIBS_SELECT=$(LIBS) -lboost_context
     else
         ifeq (, $(shell which nvcc))
-            CUDA_CC=mpic++ -x c++ $(INCLUDE_PATH)
+            CUDA_CC=tput setaf 1; echo "ERROR: NVCC not found; HIP and CUDA_ON_CPU disabled!"; tput sgr0 \#
             INCLUDE_PATH_NVCC=
-            CUDA_CC_LINK=mpic++
+            CUDA_CC_LINK=\#
             CUDA_OPTIONS=
-            LIBS_SELECT=$(LIBS)
+            LIBS_SELECT=
         else
+            INCLUDE_PATH_NVCC:=-Xcompiler=-Wno-deprecated-declarations $(INCLUDE_PATH_NVCC)
             CUDA_CC=nvcc -ccbin=mpic++
             CUDA_CC_LINK=nvcc -ccbin=mpic++
-            CUDA_OPTIONS=-use_fast_math  -arch=sm_61 -lineinfo --extended-lambda --expt-relaxed-constexpr 
+            CUDA_OPTIONS=-O3 --std=c++14 -use_fast_math  -arch=sm_61 -lineinfo --extended-lambda --expt-relaxed-constexpr
             LIBS_SELECT=$(LIBS_NVCC)
         endif
     endif
@@ -44,7 +46,7 @@ else
     CUDA_CC_LINK:=$(CUDA_CC_LINK)
 endif
 
-LDIR =
-OPT=
+OPT=-g -O3 --std=c++14
+INCLUDE_PATH:=-Wno-deprecated-declarations $(INCLUDE_PATH) 
 
 INCLUDE_PATH_NVCC:=$(INCLUDE_PATH_NVCC) -I./include 
diff --git a/install b/install
index 639179961ac49b5e5a67e66150f8004e430798ba..61e26be0a445f840132780b17a5384ce680a1ef3 100755
--- a/install
+++ b/install
@@ -467,14 +467,14 @@ elif [ -d "$i_dir/HDF5/lib64" ]; then
   hdf5_lib_dir=-L$i_dir/HDF5/lib64
 fi
 
-echo "INCLUDE_PATH=$mpi_include_dirs $cuda_include_dirs -Wno-deprecated-declarations $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/VCDEVEL/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 -I$i_dir/BLITZ/include -I$i_dir/ALGOIM/include  -I$i_dir/SUITESPARSE/include " > example.mk
+echo "INCLUDE_PATH=$mpi_include_dirs $cuda_include_dirs $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/VCDEVEL/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 -I$i_dir/BLITZ/include -I$i_dir/ALGOIM/include  -I$i_dir/SUITESPARSE/include " > example.mk
 echo "LIBS_PATH=$mpi_libs -L$install_base/openfpm_devices/lib -L$install_base/openfpm_pdata/lib  -L$install_base/openfpm_vcluster/lib -L$i_dir/VCDEVEL/lib  -L$i_dir/METIS/lib -L$i_dir/PARMETIS/lib  -L$i_dir/BOOST/lib $hdf5_lib_dir -L$i_dir/LIBHILBERT/lib  $lin_alg_dir " >> example.mk
 if [ x"$cuda_on_cpu" == x"YES" ]; then
    echo "CUDA_ON_CPU=YES" >> example.mk
 fi
 echo "LIBS=$openmp_flags $mpi_libs $openmp_libs -lvcluster -lofpm_pdata -lofpmmemory -lparmetis -lmetis -lboost_iostreams -lboost_program_options -lhdf5 -llibhilbert -lVc  $(cat cuda_lib) $lin_alg_lib -ldl -lboost_filesystem -lboost_system $optional_boost" >> example.mk
 echo "LIBS_NVCC=-Xcompiler=$openmp_flags $mpi_libs -lvcluster -lofpm_pdata -lofpmmemory -lparmetis -lmetis -lboost_iostreams -lboost_program_options -lhdf5 -llibhilbert -lVc  $(cat cuda_lib) $lin_alg_lib -ldl -lboost_filesystem -lboost_system $optional_boost" >> example.mk
-echo "INCLUDE_PATH_NVCC=-Xcompiler="-Wno-deprecated-declarations" -Xcompiler=$(cat openmp_flags) "$(cat cuda_options)" $mpi_include_dirs -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 -I$i_dir/BLITZ/include -I$i_dir/ALGOIM/include  -I$i_dir/SUITESPARSE/include " >> example.mk
+echo "INCLUDE_PATH_NVCC=-Xcompiler=$(cat openmp_flags) "$(cat cuda_options)" $mpi_include_dirs -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 -I$i_dir/BLITZ/include -I$i_dir/ALGOIM/include  -I$i_dir/SUITESPARSE/include " >> example.mk
 cp example.mk src/example.mk
 cp example.mk example/example.mk
 cp example.mk ~/.openfpm.mk