1
# mingw64-cross-mpi = Windows 64-bit, cross-compiled on Fedora 18, gcc-4.7.1, MinGW, internal FFT, MPICH2, OpenMP
5
# ---------------------------------------------------------------------
6
# compiler/linker settings
7
# specify flags and libraries needed for your compiler
9
CC = x86_64-w64-mingw32-g++
10
CCFLAGS = -O3 -march=core2 -mtune=core2 -mpc64 -msse2 -fopenmp \
11
-ffast-math -fstrict-aliasing -Wall -W -Wno-uninitialized
13
SHFLAGS = # -fPIC (not needed on windows, all code is PIC)
16
LINK = x86_64-w64-mingw32-g++
17
LINKFLAGS = -O2 -march=core2 -mtune=core2 -mpc64 -msse2 -fopenmp
18
LIB = -lwsock32 -static-libgcc
19
SIZE = x86_64-w64-mingw32-size
21
ARCHIVE = x86_64-w64-mingw32-ar
25
# name of object file subdir for libraries in lib with leading '/'
26
LIBOBJDIR = /Obj_mingw64-mpi
28
# ---------------------------------------------------------------------
29
# LAMMPS-specific settings
30
# specify settings for LAMMPS features you will use
31
# if you change any -D setting, do full re-compile after "make clean"
33
# LAMMPS ifdef settings, OPTIONAL
34
# see possible settings in doc/Section_start.html#2_2 (step 4)
36
LMP_INC = -DLAMMPS_SMALLBIG -DLAMMPS_JPEG -DLAMMPS_PNG -DLAMMPS_XDR -DLAMMPS_GZIP -DLAMMPS_FFMPEG
38
# MPI library, REQUIRED
39
# see discussion in doc/Section_start.html#2_2 (step 5)
40
# can point to dummy MPI library in src/STUBS as in Makefile.serial
41
# INC = path for mpi.h, MPI compiler settings
42
# PATH = path for MPI library
43
# LIB = name of MPI library
45
MPI_INC = -I../../tools/mingw-cross/mpich2-win64/include
46
MPI_PATH = -L../../tools/mingw-cross/mpich2-win64/lib
49
# FFT library, OPTIONAL
50
# see discussion in doc/Section_start.html#2_2 (step 6)
51
# can be left blank to use provided KISS FFT library
52
# INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings
53
# PATH = path for FFT library
54
# LIB = name of FFT library
60
# JPEG and/or PNG library, OPTIONAL
61
# see discussion in doc/Section_start.html#2_2 (step 7)
62
# only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC
63
# INC = path(s) for jpeglib.h and/or png.h
64
# PATH = path(s) for JPEG library and/or PNG library
65
# LIB = name(s) of JPEG library and/or PNG library
69
JPG_LIB = -ljpeg -lpng -lz
71
# ---------------------------------------------------------------------
72
# build rules and dependencies
73
# no need to edit this section
75
include Makefile.package.settings
76
include Makefile.package
78
EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) $(PKG_SYSINC)
79
EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(PKG_SYSPATH)
80
EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(PKG_SYSLIB)
90
$(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE)
96
$(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)
99
$(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \
100
$(OBJ) $(EXTRA_LIB) $(LIB)
105
$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
108
$(CC) $(CCFLAGS) $(EXTRA_INC) $(DEPFLAGS) $< > $@
110
# Individual dependencies
112
DEPENDS = $(OBJ:.o=.d)