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

« back to all changes in this revision

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

  • 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
# serial = RedHat Linux box, g++4, no MPI, no FFTs
 
2
 
 
3
SHELL = /bin/sh
 
4
 
 
5
# ---------------------------------------------------------------------
 
6
# compiler/linker settings
 
7
# specify flags and libraries needed for your compiler
 
8
 
 
9
CC =            g++
 
10
CCFLAGS =       -O
 
11
SHFLAGS =       -fPIC
 
12
DEPFLAGS =      -M
 
13
 
 
14
LINK =          g++
 
15
LINKFLAGS =     -O
 
16
LIB =           
 
17
SIZE =          size
 
18
 
 
19
ARCHIVE =       ar
 
20
ARFLAGS =       -rc
 
21
SHLIBFLAGS =    -shared
 
22
 
 
23
# ---------------------------------------------------------------------
 
24
# LAMMPS-specific settings, all OPTIONAL
 
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
 
29
# see possible settings in Section 2.2 (step 4) of manual
 
30
 
 
31
LMP_INC =       -DLAMMPS_GZIP
 
32
 
 
33
# MPI library
 
34
# see discussion in Section 2.2 (step 5) of manual
 
35
# MPI wrapper compiler/linker can provide this info
 
36
# can point to dummy MPI library in src/STUBS as in Makefile.serial
 
37
# use -D MPICH and OMPI settings in INC to avoid C++ lib conflicts
 
38
# INC = path for mpi.h, MPI compiler settings
 
39
# PATH = path for MPI library
 
40
# LIB = name of MPI library
 
41
 
 
42
MPI_INC =       -I../STUBS
 
43
MPI_PATH =      -L../STUBS
 
44
MPI_LIB =       -lmpi_stubs
 
45
 
 
46
# FFT library
 
47
# see discussion in Section 2.2 (step 6) of manaul
 
48
# can be left blank to use provided KISS FFT library
 
49
# INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings
 
50
# PATH = path for FFT library
 
51
# LIB = name of FFT library
 
52
 
 
53
FFT_INC =
 
54
FFT_PATH = 
 
55
FFT_LIB =
 
56
 
 
57
# JPEG and/or PNG library
 
58
# see discussion in Section 2.2 (step 7) of manual
 
59
# only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC
 
60
# INC = path(s) for jpeglib.h and/or png.h
 
61
# PATH = path(s) for JPEG library and/or PNG library
 
62
# LIB = name(s) of JPEG library and/or PNG library
 
63
 
 
64
JPG_INC =       
 
65
JPG_PATH =      
 
66
JPG_LIB =       
 
67
 
 
68
# ---------------------------------------------------------------------
 
69
# build rules and dependencies
 
70
# do not edit this section
 
71
 
 
72
include Makefile.package.settings
 
73
include Makefile.package
 
74
 
 
75
EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) $(PKG_SYSINC)
 
76
EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(PKG_SYSPATH)
 
77
EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(PKG_SYSLIB)
 
78
 
 
79
# Path to src files
 
80
 
 
81
vpath %.cpp ..
 
82
vpath %.h ..
 
83
 
 
84
# Link target
 
85
 
 
86
$(EXE): $(OBJ)
 
87
        $(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE)
 
88
        $(SIZE) $(EXE)
 
89
 
 
90
# Library targets
 
91
 
 
92
lib:    $(OBJ)
 
93
        $(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)
 
94
 
 
95
shlib:  $(OBJ)
 
96
        $(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \
 
97
        $(OBJ) $(EXTRA_LIB) $(LIB)
 
98
 
 
99
# Compilation rules
 
100
 
 
101
%.o:%.cpp
 
102
        $(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
 
103
 
 
104
%.d:%.cpp
 
105
        $(CC) $(CCFLAGS) $(EXTRA_INC) $(DEPFLAGS) $< > $@
 
106
 
 
107
%.o:%.cu
 
108
        $(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
 
109
 
 
110
# Individual dependencies
 
111
 
 
112
DEPENDS = $(OBJ:.o=.d)
 
113
sinclude $(DEPENDS)