#include "pull.h"
#include "update.h"
-#ifdef GMX_THREADS
+
++#ifdef GMX_THREAD_MPI
+ #include "thread_mpi/threads.h"
+ #endif
+
#ifdef __cplusplus
extern "C" {
#endif
#ifdef GMX_LIB_MPI
#include <mpi.h>
#else
-#ifdef GMX_THREADS
+#ifdef GMX_THREAD_MPI
- #include "../tmpi.h"
+ #include "../thread_mpi/tmpi.h"
+ #include "../thread_mpi/mpi_bindings.h"
#else
typedef void* MPI_Comm;
typedef void* MPI_Request;
#include "writeps.h"
#include "macros.h"
#include "xvgr.h"
-#include "pppm.h"
#include "gmxfio.h"
--#ifdef GMX_THREADS
- #include "thread_mpi.h"
++#ifdef GMX_THREAD_MPI
+ #include "thread_mpi/threads.h"
#endif
#define p2(x) ((x)*(x))
# Files called xxx_test.c are test drivers with a main() function for
# module xxx.c, so they should not be included in the library
-file(GLOB_RECURSE NOT_MDLIB_SOURCES *_test.c *\#*)
-list(REMOVE_ITEM MDLIB_SOURCES ${NOT_MDLIB_SOURCES})
+ if(NOT GMX_FFT_FFTPACK)
+ list(REMOVE_ITEM MDLIB_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/fftpack.c)
+ endif()
+
add_library(md ${MDLIB_SOURCES})
target_link_libraries(md gmx ${GMX_EXTRA_LIBRARIES} ${FFT_LIBRARIES} ${XML_LIBRARIES})
set_target_properties(md PROPERTIES OUTPUT_NAME "md${GMX_LIBS_SUFFIX}" SOVERSION ${SOVERSION} INSTALL_NAME_DIR "${LIB_INSTALL_DIR}")
#define FFTWPREFIX(name) fftwf_ ## name
#endif
-#ifdef GMX_THREADS
++#ifdef GMX_THREAD_MPI
+ #include "thread_mpi/threads.h"
+ #endif
-#ifdef GMX_THREADS
+#ifdef GMX_THREAD_MPI
/* none of the fftw3 calls, except execute(), are thread-safe, so
we need to serialize them with this mutex. */
static tMPI_Thread_mutex_t big_fftw_mutex=TMPI_THREAD_MUTEX_INITIALIZER;