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

« back to all changes in this revision

Viewing changes to src/MAKE/MACHINES/Makefile.ubuntu_simple

  • 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
# ubuntu_simple = Ubuntu Linux box, g++, openmpi, KISS FFT
 
2
 
 
3
# you have to install the packages g++, mpi-default-bin and mpi-default-dev 
 
4
# to compile LAMMPS with this makefile
 
5
 
 
6
SHELL = /bin/sh
 
7
 
 
8
# ---------------------------------------------------------------------
 
9
# compiler/linker settings
 
10
# specify flags and libraries needed for your compiler
 
11
 
 
12
CC =            mpic++
 
13
CCFLAGS =       -g -O3 # -Wunused
 
14
SHFLAGS =       -fPIC
 
15
DEPFLAGS =      -M
 
16
 
 
17
LINK =          mpic++
 
18
LINKFLAGS =     -g -O3
 
19
LIB = 
 
20
SIZE =          size
 
21
 
 
22
ARCHIVE =       ar
 
23
ARFLAGS =       -rc
 
24
SHLIBFLAGS =    -shared
 
25
 
 
26
# ---------------------------------------------------------------------
 
27
# LAMMPS-specific settings, all OPTIONAL
 
28
# specify settings for LAMMPS features you will use
 
29
# if you change any -D setting, do full re-compile after "make clean"
 
30
 
 
31
# LAMMPS ifdef settings
 
32
# see possible settings in Section 2.2 (step 4) of manual
 
33
 
 
34
LMP_INC =       -DLAMMPS_GZIP
 
35
 
 
36
# MPI library
 
37
# see discussion in Section 2.2 (step 5) of manual
 
38
# MPI wrapper compiler/linker can provide this info
 
39
# can point to dummy MPI library in src/STUBS as in Makefile.serial
 
40
# use -D MPICH and OMPI settings in INC to avoid C++ lib conflicts
 
41
# INC = path for mpi.h, MPI compiler settings
 
42
# PATH = path for MPI library
 
43
# LIB = name of MPI library
 
44
 
 
45
MPI_INC =
 
46
MPI_PATH = 
 
47
MPI_LIB =
 
48
 
 
49
# FFT library
 
50
# see discussion in Section 2.2 (step 6) of manaul
 
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
 
55
 
 
56
FFT_INC =
 
57
FFT_PATH = 
 
58
FFT_LIB =
 
59
 
 
60
# JPEG and/or PNG library
 
61
# see discussion in Section 2.2 (step 7) of manual
 
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
 
66
 
 
67
JPG_INC =       
 
68
JPG_PATH =      
 
69
JPG_LIB =
 
70
 
 
71
# ---------------------------------------------------------------------
 
72
# build rules and dependencies
 
73
# do not edit this section
 
74
 
 
75
include Makefile.package.settings
 
76
include Makefile.package
 
77
 
 
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)
 
81
 
 
82
# Path to src files
 
83
 
 
84
vpath %.cpp ..
 
85
vpath %.h ..
 
86
 
 
87
# Link target
 
88
 
 
89
$(EXE): $(OBJ)
 
90
        $(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE)
 
91
        $(SIZE) $(EXE)
 
92
 
 
93
# Library targets
 
94
 
 
95
lib:    $(OBJ)
 
96
        $(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)
 
97
 
 
98
shlib:  $(OBJ)
 
99
        $(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \
 
100
        $(OBJ) $(EXTRA_LIB) $(LIB)
 
101
 
 
102
# Compilation rules
 
103
 
 
104
%.o:%.cpp
 
105
        $(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
 
106
 
 
107
%.d:%.cpp
 
108
        $(CC) $(CCFLAGS) $(EXTRA_INC) $(DEPFLAGS) $< > $@
 
109
 
 
110
%.o:%.cu
 
111
        $(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
 
112
 
 
113
# Individual dependencies
 
114
 
 
115
DEPENDS = $(OBJ:.o=.d)
 
116
sinclude $(DEPENDS)