~ubuntu-branches/debian/sid/lammps/sid

« back to all changes in this revision

Viewing changes to src/MAKE/Makefile.openmpi

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2015-04-29 23:44:49 UTC
  • mfrom: (5.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20150429234449-mbhy9utku6hp6oq8
Tags: 0~20150313.gitfa668e1-1
Upload into unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# openmpi = Fedora Core 6, mpic++, OpenMPI-1.1, FFTW2
2
 
 
3
 
SHELL = /bin/sh
4
 
 
5
 
# ---------------------------------------------------------------------
6
 
# compiler/linker settings
7
 
# specify flags and libraries needed for your compiler
8
 
 
9
 
CC =            mpic++
10
 
CCFLAGS =       -Wall $(shell dpkg-buildflags --get CXXFLAGS) -fopenmp
11
 
SHFLAGS =       -fPIC
12
 
DEPFLAGS =      -M
13
 
 
14
 
LINK =          mpic++
15
 
LINKFLAGS =     -O $(shell dpkg-buildflags --get LDFLAGS)
16
 
LIB =           -lstdc++ -fopenmp
17
 
SIZE =          size
18
 
 
19
 
ARCHIVE =       ar
20
 
ARFLAGS =       -rcsv
21
 
SHLIBFLAGS =    -shared
22
 
 
23
 
# ---------------------------------------------------------------------
24
 
# LAMMPS-specific settings
25
 
# specify settings for LAMMPS features you will use
26
 
# if you change any -D setting, do full re-compile after "make clean"
27
 
 
28
 
# LAMMPS ifdef settings, OPTIONAL
29
 
# see possible settings in doc/Section_start.html#2_2 (step 4)
30
 
 
31
 
LMP_INC =       -DLAMMPS_GZIP -DLAMMPS_JPEG
32
 
 
33
 
# MPI library, REQUIRED
34
 
# see discussion in doc/Section_start.html#2_2 (step 5)
35
 
# can point to dummy MPI library in src/STUBS as in Makefile.serial
36
 
# INC = path for mpi.h, MPI compiler settings
37
 
# PATH = path for MPI library
38
 
# LIB = name of MPI library
39
 
 
40
 
MPI_INC =       
41
 
MPI_PATH = 
42
 
MPI_LIB =       
43
 
 
44
 
# FFT library, OPTIONAL
45
 
# see discussion in doc/Section_start.html#2_2 (step 6)
46
 
# can be left blank to use provided KISS FFT library
47
 
# INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings
48
 
# PATH = path for FFT library
49
 
# LIB = name of FFT library
50
 
 
51
 
FFT_INC =       -DFFT_FFTW3
52
 
FFT_PATH = 
53
 
FFT_LIB =       -lfftw3
54
 
 
55
 
# JPEG and/or PNG library, OPTIONAL
56
 
# see discussion in doc/Section_start.html#2_2 (step 7)
57
 
# only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC
58
 
# INC = path(s) for jpeglib.h and/or png.h
59
 
# PATH = path(s) for JPEG library and/or PNG library
60
 
# LIB = name(s) of JPEG library and/or PNG library
61
 
 
62
 
JPG_INC =       
63
 
JPG_PATH =      
64
 
JPG_LIB =       -ljpeg
65
 
 
66
 
# ---------------------------------------------------------------------
67
 
# build rules and dependencies
68
 
# no need to edit this section
69
 
 
70
 
include Makefile.package.settings
71
 
include Makefile.package
72
 
 
73
 
EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) $(PKG_SYSINC)
74
 
EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(PKG_SYSPATH)
75
 
EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(PKG_SYSLIB)
76
 
 
77
 
# Path to src files
78
 
 
79
 
vpath %.cpp ..
80
 
vpath %.h ..
81
 
 
82
 
# Link target
83
 
 
84
 
$(EXE): $(OBJ)
85
 
        $(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE)
86
 
        $(SIZE) $(EXE)
87
 
 
88
 
# Library targets
89
 
 
90
 
lib:    $(OBJ)
91
 
        $(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)
92
 
 
93
 
shlib:  $(OBJ)
94
 
        $(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \
95
 
        $(OBJ) $(EXTRA_LIB) $(LIB)
96
 
 
97
 
# Compilation rules
98
 
 
99
 
%.o:%.cpp
100
 
        $(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
101
 
 
102
 
%.d:%.cpp
103
 
        $(CC) $(CCFLAGS) $(EXTRA_INC) $(DEPFLAGS) $< > $@
104
 
 
105
 
# Individual dependencies
106
 
 
107
 
DEPENDS = $(OBJ:.o=.d)
108
 
sinclude $(DEPENDS)