-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathsystem_defs.mk
188 lines (171 loc) · 3.66 KB
/
system_defs.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
#----------------------------------------------------------------------------
#
# makefile system definitions
#
# Tom Peterka
# Argonne National Laboratory
# 9700 S. Cass Ave.
# Argonne, IL 60439
#
# All rights reserved. May not be used, modified, or copied
# without permission
#
#----------------------------------------------------------------------------
#
# users: set your architecture, options, and paths in user_defs.h
# you should not need to touch this or other makefiles in the project
#
#----------------------------------------------------------------------------
# parallel netcdf, parallel hdf5, and bil don't make sense without MPI
ifneq ($(MPI), YES)
PNETCDF = NO
HDF5 = NO
BIL = NO
endif
# includes
INCLUDE =
ifeq ($(PNETCDF), YES)
INCLUDE += -I$(NETCDF_INC)
endif
ifeq ($(HDF5), YES)
INCLUDE += -I$(HDF_INC)
endif
ifeq ($(ZOLTAN), YES)
INCLUDE += -I$(ZOLTAN_INC)
endif
INCLUDE += $(MISC_INC) # no extra symbols such as -I are prepended for MISC_INC
# libraries
LIBS = -lm
ifeq ($(PNETCDF), YES)
LIBS += -L$(NETCDF_LIB)
endif
ifeq ($(ARCH), BGP)
ifeq ($(HDF5), YES)
LIBS += -L$(HDF_LIB)
endif
endif
ifneq ($(ARCH), BGP)
ifeq ($(HDF5), YES)
LIBS += -lz -L$(HDF_LIB)
endif
endif
ifeq ($(ZOLTAN), YES)
LIBS += -L$(ZOLTAN_LIB)
endif
ifeq ($(ARCH), MAC_OSX_OMPI)
ifeq ($(GRAPHICS), YES)
LIBS += -framework GLUT -framework OpenGL
endif
endif
ifeq ($(ARCH), MAC_OSX_MPICH)
ifeq ($(GRAPHICS), YES)
LIBS += -framework GLUT -framework OpenGL
endif
endif
ifeq ($(ARCH), LINUX)
ifeq ($(GRAPHICS), YES)
LIBS += -lglut -lGLU -lGL
endif
endif
ifeq ($(ARCH), LINUX_SERIAL)
ifeq ($(GRAPHICS), YES)
LIBS += -lglut -lGLU -lGL
endif
endif
LIBS += $(MISC_LIB) # no extra symbols such as -l are prepended for MISC_LIB
# compiler flags
CCFLAGS = -g -c
CCFLAGS += -D_OSUFLOW
# additional compiler flags and paths for each architecture
ifeq ($(ARCH), MAC_OSX_OMPI) # mac osx w/ open mpi
C++ = g++
CC = gcc
CCFLAGS += -DMAC_OSX_OMPI
ifeq ($(MPI), YES)
CCFLAGS += -D_MPI
endif
endif
ifeq ($(ARCH), MAC_OSX_MPICH) # mac osx w/ mpich
C++ = mpicxx
CC = mpicc
CCFLAGS += -DMAC_OSX_MPICH
ifeq ($(MPI), YES)
CCFLAGS += -D_MPI
endif
endif
ifeq ($(ARCH), LINUX_SERIAL) # linux serial (used by Han-Wei)
C++ = g++
CC = gcc
CCFLAGS += -DLINUX
# DEL-BY-LEETEN 04/09/2011-BEGIN
# LIBS =
# DEL-BY-LEETEN 04/09/2011-END
endif
ifeq ($(ARCH), LINUX) # linux generic
C++ = mpicxx
CC = mpicc
ifeq ($(MPE), YES)
C++ = mpecxx -mpilog
endif
CCFLAGS += -DLINUX
ifeq ($(MPI), YES)
CCFLAGS += -D_MPI -DMPICH_IGNORE_CXX_SEEK -DMPICH_SKIP_MPICXX
endif
endif
ifeq ($(ARCH), BGP) # BG/P
C++ = mpixlcxx_r
CC = mpixlc_r
ifeq ($(MPE), YES)
C++ = /soft/apps/mpe/install_ibm/bin/mpecc -mpicc=mpixlcxx_r -mpilog
endif
CCFLAGS += -O3 -qarch=450d -qtune=450 -DBGP
ifeq ($(MPI), YES)
CCFLAGS += -D_MPI -DMPICH_IGNORE_CXX_SEEK -DMPICH_SKIP_MPICXX
endif
INCLUDE += -I/usr/local/include \
-I/usr/X11R6/include \
-I/bgsys/drivers/ppcfloor/arch/include \
-I/soft/apps/hdf5-1.8.0/include \
-I/soft/apps/parallel-netcdf-1.0.3-xl/include
endif
ifeq ($(ARCH), EUREKA) # eureka
INCLUDE = -I/usr/include
C++ = mpicxx
CC = mpicc
ifeq ($(MPE), YES)
C++ = mpecxx -mpilog
endif
CCFLAGS += -O3 -DEUREKA
ifeq ($(MPI), YES)
CCFLAGS += -D_MPI -DMPICH_IGNORE_CXX_SEEK -DMPICH_SKIP_MPICXX
endif
endif
# additional compiler flags
ifeq ($(PNETCDF), YES)
CCFLAGS += -DPNETCDF
endif
ifeq ($(HDF5), YES)
CCFLAGS += -DHDF5
endif
ifeq ($(GRAPHICS), YES)
CCFLAGS += -DGRAPHICS
endif
ifeq ($(MPE), YES)
CCFLAGS += -DMPE
endif
ifeq ($(BYTE_SWAP), YES)
CCFLAGS += -DBYTE_SWAP
endif
ifeq ($(DEBUG), YES)
CCFLAGS += -DDEBUG
endif
ifeq ($(WARNINGS), YES)
CCFLAGS += -Wall -Wextra
endif
ifeq ($(ZOLTAN), YES)
CCFLAGS += -DZOLTAN
endif
ifeq ($(BIL), YES)
CCFLAGS += -DUSE_BIL
endif