|
| 1 | +# Makefile |
| 2 | +# |
| 3 | +# -- This Makefile builds the OpenCoarrays libraries using setings in make.inc. |
| 4 | +# (Please edit make.inc before using this Makefile.) |
| 5 | +# |
| 6 | +# Instead of using this Makefile, the preferred alternative is to invoke |
| 7 | +# ./install.sh, which builds the caf compiler wrapper, the cafrun program |
| 8 | +# launcher, the test suite, and any undetected prerequisite packages, and |
| 9 | +# which customizes the build for the environment. |
| 10 | +# |
| 11 | +# Usage (default: GASNET=no): |
| 12 | +# make - Builds libcaf_mpi.a, the MPI transport layer. |
| 13 | +# make GASNET=no all - Builds libcaf_mpi.a and libcaf_gasnet.a. |
| 14 | +# make clean - Deletes *.o files. Retains *.a files. |
| 15 | +# |
| 16 | +# OpenCoarrays is distributed under the OSI-approved BSD 3-clause License: |
| 17 | +# Copyright (c) 2015-2016, Sourcery, Inc. |
| 18 | +# Copyright (c) 2015-2016, Sourcery Institute |
| 19 | +# All rights reserved. |
| 20 | +# |
| 21 | +# Redistribution and use in source and binary forms, with or without modification, |
| 22 | +# are permitted provided that the following conditions are met: |
| 23 | +# |
| 24 | +# 1. Redistributions of source code must retain the above copyright notice, this |
| 25 | +# list of conditions and the following disclaimer. |
| 26 | +# 2. Redistributions in binary form must reproduce the above copyright notice, this |
| 27 | +# list of conditions and the following disclaimer in the documentation and/or |
| 28 | +# other materials provided with the distribution. |
| 29 | +# 3. Neither the names of the copyright holders nor the names of their contributors |
| 30 | +# may be used to endorse or promote products derived from this software without |
| 31 | +# specific prior written permission. |
| 32 | +# |
| 33 | +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| 34 | +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 35 | +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| 36 | +# IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
| 37 | +# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
| 38 | +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 39 | +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 40 | +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 41 | +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 42 | +# POSSIBILITY OF SUCH DAMAGE. |
| 43 | + |
1 | 44 | include make.inc
|
2 | 45 | export
|
3 | 46 |
|
| 47 | +# Conditionally enable the build of the GASNet library libcaf_gasnet.a, |
| 48 | +# an unmaintained but previously functional MPI alterntive. |
| 49 | +ifeq ($(GASNET),yes) |
| 50 | + gasnet_=gasnet |
| 51 | +endif |
| 52 | + |
4 | 53 | .PHONY : common
|
5 |
| -.PHONY : single |
6 | 54 | .PHONY : gasnet
|
7 | 55 | .PHONY : mpi
|
8 |
| -#.PHONY : armci |
| 56 | +.PHONY : $(gasent_) |
| 57 | + |
| 58 | +all: common mpi $(gasnet_) |
9 | 59 |
|
10 | 60 | mpi: common
|
11 | 61 | $(MAKE) -C $@
|
12 | 62 |
|
13 |
| -all: common single gasnet mpi # armci |
14 |
| - |
15 | 63 | common:
|
16 | 64 | $(MAKE) -C $@
|
17 | 65 |
|
18 |
| -single: common |
19 |
| - $(MAKE) -C $@ |
20 |
| - |
21 |
| -#armci: common |
22 |
| -# $(MAKE) -C $@ |
23 |
| - |
| 66 | +ifeq ($(GASNET),yes) |
24 | 67 | gasnet: common
|
25 | 68 | $(MAKE) -C $@
|
| 69 | +endif |
26 | 70 |
|
27 |
| -test: single gasnet mpi #armci |
28 |
| - $(MAKE) -C tests test |
29 |
| -test-mpi: mpi |
30 |
| - $(MAKE) -C tests test-mpi |
31 |
| -test-gasnet: gasnet |
32 |
| - $(MAKE) -C tests test-gasnet |
33 |
| -#test-armci: armci |
34 |
| -# $(MAKE) -C tests test-armci |
35 |
| -test-single: single |
36 |
| - $(MAKE) -C tests test-single |
37 |
| - |
38 |
| -run: single armci gasnet mpi |
39 |
| - $(MAKE) -C testsuite run |
40 |
| -run-mpi: mpi |
41 |
| - $(MAKE) -C testsuite run-mpi |
42 |
| -run-gasnet: gasnet |
43 |
| - $(MAKE) -C testsuite run-gasnet |
44 |
| -#run-armci: armci |
45 |
| -# $(MAKE) -C testsuite run-armci |
46 |
| -run-single: single |
47 |
| - $(MAKE) -C testsuite run-single |
48 |
| - |
| 71 | +# Delete temporary files files: |
49 | 72 | clean:
|
50 |
| -# $(MAKE) -k -C common clean |
51 |
| -# $(MAKE) -k -C single clean |
52 |
| -# $(MAKE) -k -C gasnet clean |
53 | 73 | $(MAKE) -k -C mpi clean
|
54 |
| -# $(MAKE) -k -C tests clean |
55 |
| -# $(MAKE) -k -C armci clean |
| 74 | + $(MAKE) -k -C common clean |
| 75 | +ifeq ($(GASNET),yes) |
| 76 | + $(MAKE) -k -C gasnet clean |
| 77 | +endif |
56 | 78 |
|
57 | 79 | distclean: clean
|
58 | 80 | $(MAKE) -k -C common distclean
|
59 |
| -# $(MAKE) -k -C single distclean |
60 | 81 | $(MAKE) -k -C mpi distclean
|
61 |
| -# $(MAKE) -k -C gasnet distclean |
62 |
| -# $(MAKE) -k -C testsuite distclean |
63 |
| -# (MAKE) -k -C armci distclean |
| 82 | +ifeq ($(GASNET),yes) |
| 83 | + $(MAKE) -k -C gasnet distclean |
| 84 | +endif |
0 commit comments