Description: use CXX and LD-flags, proposed by build environment instead
 of hardcoded. Fix linkage problem with fftw3.
Author: Anton Gladky <gladk@debian.org>
Last-Update: 2014-02-13

--- a/src/MAKE/Makefile.openmpi
+++ b/src/MAKE/Makefile.openmpi
@@ -7,14 +7,13 @@
 # specify flags and libraries needed for your compiler
 
 CC =		mpic++
-CCFLAGS =	-O2 \
-		-funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized
+CCFLAGS =	-Wall $(shell dpkg-buildflags --get CXXFLAGS) -fopenmp
 SHFLAGS =	-fPIC
 DEPFLAGS =	-M
 
 LINK =		mpic++
-LINKFLAGS =	-O
-LIB =           -lstdc++
+LINKFLAGS =	-O $(shell dpkg-buildflags --get LDFLAGS)
+LIB =           -lstdc++ -fopenmp
 SIZE =		size
 
 ARCHIVE =	ar
@@ -29,7 +28,7 @@
 # LAMMPS ifdef settings, OPTIONAL
 # see possible settings in doc/Section_start.html#2_2 (step 4)
 
-LMP_INC =	-DLAMMPS_GZIP
+LMP_INC =	-DLAMMPS_GZIP -DLAMMPS_JPEG
 
 # MPI library, REQUIRED
 # see discussion in doc/Section_start.html#2_2 (step 5)
@@ -49,9 +48,9 @@
 # PATH = path for FFT library
 # LIB = name of FFT library
 
-FFT_INC =       -DFFT_FFTW
+FFT_INC =       -DFFT_FFTW3
 FFT_PATH = 
-FFT_LIB =	-lfftw
+FFT_LIB =	-lfftw3
 
 # JPEG and/or PNG library, OPTIONAL
 # see discussion in doc/Section_start.html#2_2 (step 7)
@@ -62,7 +61,7 @@
 
 JPG_INC =       
 JPG_PATH = 	
-JPG_LIB =	
+JPG_LIB =	-ljpeg
 
 # ---------------------------------------------------------------------
 # build rules and dependencies
