Makefile.am 3.18 KB
Newer Older
1
# This file is part of SWIFT.
2
# Copyright (c) 2012 Pedro Gonnet (pedro.gonnet@durham.ac.uk),
3
#                    Matthieu Schaller (matthieu.schaller@durham.ac.uk).
4
#
Pedro Gonnet's avatar
Pedro Gonnet committed
5
6
7
8
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
9
#
Pedro Gonnet's avatar
Pedro Gonnet committed
10
11
12
13
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
14
#
Pedro Gonnet's avatar
Pedro Gonnet committed
15
16
17
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

Pedro Gonnet's avatar
Pedro Gonnet committed
18
19
20
# Common flags
MYFLAGS = -DTIMER

Pedro Gonnet's avatar
Pedro Gonnet committed
21
# Add the source directory and debug to CFLAGS
22
AM_CFLAGS = -I../src $(HDF5_CPPFLAGS)
Pedro Gonnet's avatar
Pedro Gonnet committed
23

24
AM_LDFLAGS = $(HDF5_LDFLAGS)
25

26
27
# Extra libraries.
EXTRA_LIBS = $(HDF5_LIBS) $(PROFILER_LIBS) $(TCMALLOC_LIBS)
28

29
# MPI libraries.
30
MPI_LIBS = $(METIS_LIBS) $(MPI_THREAD_LIBS)
31
MPI_FLAGS = -DWITH_MPI $(METIS_INCS)
32

33

34
# Programs.
35
bin_PROGRAMS = swift swift_fixdt
Pedro Gonnet's avatar
Pedro Gonnet committed
36

37
38
# Build MPI versions as well?
if HAVEMPI
39
bin_PROGRAMS += swift_mpi swift_fixdt_mpi
40
41
endif

42
43
44
45
46
# engine_policy_setaffinity is available?
if HAVESETAFFINITY
ENGINE_POLICY_SETAFFINITY=| engine_policy_setaffinity
else
ENGINE_POLICY_SETAFFINITY=
47
48
endif

49
50
# Sources for swift
swift_SOURCES = main.c
51
swift_CFLAGS = $(MYFLAGS) $(AM_CFLAGS) -DENGINE_POLICY="engine_policy_keep $(ENGINE_POLICY_SETAFFINITY)"
52
swift_LDADD =  ../src/.libs/libswiftsim.a $(EXTRA_LIBS)
Pedro Gonnet's avatar
Pedro Gonnet committed
53

54
55
swift_fixdt_SOURCES = main.c
swift_fixdt_CFLAGS = $(MYFLAGS) $(AM_CFLAGS) -DENGINE_POLICY="engine_policy_fixdt | engine_policy_keep $(ENGINE_POLICY_SETAFFINITY)"
56
swift_fixdt_LDADD =  ../src/.libs/libswiftsim.a $(EXTRA_LIBS)
57

58
# Sources for swift_mpi, do we need an affinity policy for MPI?
59
swift_mpi_SOURCES = main.c
60
swift_mpi_CFLAGS = $(MYFLAGS) $(AM_CFLAGS) $(MPI_FLAGS) -DENGINE_POLICY="engine_policy_keep $(ENGINE_POLICY_SETAFFINITY)"
61
swift_mpi_LDADD =  ../src/.libs/libswiftsim_mpi.a $(MPI_LIBS) $(EXTRA_LIBS)
62

63
swift_fixdt_mpi_SOURCES = main.c
64
swift_fixdt_mpi_CFLAGS = $(MYFLAGS) $(AM_CFLAGS) $(MPI_FLAGS) -DENGINE_POLICY="engine_policy_fixdt | engine_policy_keep $(ENGINE_POLICY_SETAFFINITY)"
65
swift_fixdt_mpi_LDADD =  ../src/.libs/libswiftsim_mpi.a $(MPI_LIBS) $(EXTRA_LIBS)
66

67
# Scripts to generate ICs
68
EXTRA_DIST = UniformBox/makeIC.py UniformBox/run.sh UniformBox/uniformBox.yml \
Matthieu Schaller's avatar
Matthieu Schaller committed
69
	     UniformDMBox/makeIC.py \
70
	     PerturbedBox/makeIC.py \
71
72
73
	     SedovBlast/makeIC.py SedovBlast/makeIC_fcc.py SedovBlast/solution.py SedovBlast/run.sh SedovBlast/sedov.yml \
	     SodShock/makeIC.py SodShock/solution.py SodShock/glass_001.hdf5 SodShock/glass_002.hdf5 SodShock/rhox.py SodShock/run.sh SodShock/sodShock.yml \
	     CosmoVolume/getIC.sh CosmoVolume/run.sh CosmoVolume/cosmoVolume.yml \
74
75
	     BigCosmoVolume/makeIC.py \
	     BigPerturbedBox/makeIC_fcc.py \
76
             GreshoVortex/makeIC.py GreshoVortex/solution.py \
77
78
             MultiTypes/makeIC.py \
             parameter_example.yml
79
80
81
82

# Scripts to plot task graphs
EXTRA_DIST += plot_tasks_MPI.py plot_tasks.py \
	      process_plot_tasks_MPI process_plot_tasks
83