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

« back to all changes in this revision

Viewing changes to src/MAKE/Makefile.mac_mpi

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