Skip to content

Commit eb73215

Browse files
author
Damian Rouson
committed
Edit static Makefile include file make.inc
* Add license and file description * Add conditional logic to set variables based on compiler choice.
1 parent b1cffa7 commit eb73215

File tree

1 file changed

+59
-9
lines changed

1 file changed

+59
-9
lines changed

src/make.inc

Lines changed: 59 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,74 @@
1+
# make.inc
2+
#
3+
# -- This make include file defines variables for use in the OpenCoarrays
4+
# static Makefile. Please edit this file before using the Makefile.)
5+
#
6+
# OpenCoarrays is distributed under the OSI-approved BSD 3-clause License:
7+
# Copyright (c) 2015-2016, Sourcery, Inc.
8+
# Copyright (c) 2015-2016, Sourcery Institute
9+
# All rights reserved.
10+
#
11+
# Redistribution and use in source and binary forms, with or without modification,
12+
# are permitted provided that the following conditions are met:
13+
#
14+
# 1. Redistributions of source code must retain the above copyright notice, this
15+
# list of conditions and the following disclaimer.
16+
# 2. Redistributions in binary form must reproduce the above copyright notice, this
17+
# list of conditions and the following disclaimer in the documentation and/or
18+
# other materials provided with the distribution.
19+
# 3. Neither the names of the copyright holders nor the names of their contributors
20+
# may be used to endorse or promote products derived from this software without
21+
# specific prior written permission.
22+
#
23+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
24+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26+
# IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
27+
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
28+
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
29+
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
30+
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32+
# POSSIBILITY OF SUCH DAMAGE.
33+
34+
35+
# Edit the following line to choose the compiler (Options: gnu, cray)
36+
compiler=gnu
37+
38+
ifeq ($(compiler),gnu)
39+
FC=gfortran
40+
CC=gcc
41+
MPFC = mpif90
42+
MPICC = mpicc
43+
FFLAGS_EXTRA = -fcoarray=lib
44+
MPI_EXTRA_FLAGS = -Wall -Wextra -Wno-error=cpp -Wno-error=unused-parameter -DSTRIDED#-DNONBLOCKING_PUT -DCAF_MPI_LOCK_UNLOCK
45+
MPI_RUN = mpirun -np 2
46+
else
47+
ifeq ($(compiler),cray)
48+
FC=ftn
49+
CC=cc
50+
MPFC=ftn
51+
MPICC = cc
52+
endif
53+
endif
54+
155
PREFIX_NAME=_gfortran_caf_
2-
FC=gfortran
3-
CC=gcc
4-
MPFC=mpifort
556

657
FFLAGS = -O2 -g
758
CFLAGS = -O2 -g
8-
FFLAGS_EXTRA = -fcoarray=lib
59+
960
CFLAGS_EXTRA = -DPREFIX_NAME=$(PREFIX_NAME) -DHAVE_INT128_T
1061
FFLAGS += $(FFLAGS_EXTRA)
1162
CFLAGS += $(CFLAGS_EXTRA)
1263
LDFLAGS +=
1364

1465
SINGLE_CFLAGS += -Wall -Wextra
1566

16-
MPI_EXTRA_FLAGS = -Wall -Wextra -Wno-error=cpp -Wno-error=unused-parameter -DSTRIDED#-DNONBLOCKING_PUT -DCAF_MPI_LOCK_UNLOCK
67+
MPI_EXTRA_FLAGS = -DSTRIDED # -DNONBLOCKING_PUT -DCAF_MPI_LOCK_UNLOCK
1768
MPI_CFLAGS += $(MPI_EXTRA_FLAGS)
18-
#MPICC =
19-
MPI_RUN = mpirun -np 2
2069

21-
GASNET_CFLAGS += #-DSTRIDED
22-
GASNET_MAK = /home/rouson/Downloads/GASNet-1.22.4/smp-conduit/smp-par.mak
70+
GASNET_CFLAGS += # -DSTRIDED
71+
GASNET_PATH =
72+
GASNET_MAK = $(GASNET_PATH)/GASNet-1.22.4/smp-conduit/smp-par.mak
2373
GASNET_LDFLAGS +=$(GASNET_LIBS)
2474
GASNET_RUN = mpirun -np 2

0 commit comments

Comments
 (0)