Makefile.am 2.8 KB
Newer Older
Pedro Gonnet's avatar
Pedro Gonnet committed
1

2
# This file is part of SWIFT.
3
# Copyright (c) 2012 Pedro Gonnet (pedro.gonnet@durham.ac.uk),
4
#                    Matthieu Schaller (matthieu.schaller@durham.ac.uk).
5
#
Pedro Gonnet's avatar
Pedro Gonnet committed
6
7
8
9
# 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.
10
#
Pedro Gonnet's avatar
Pedro Gonnet committed
11
12
13
14
# 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.
15
#
Pedro Gonnet's avatar
Pedro Gonnet committed
16
17
18
# 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
19
20
21
# Common flags
MYFLAGS = -DTIMER

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

25
26
27
28
AM_LDFLAGS =

MPI_THREAD_LIBS = @MPI_THREAD_LIBS@
MPI_LIBS = $(METIS_LIBS) $(MPI_THREAD_LIBS)
29
MPI_FLAGS = -DWITH_MPI $(METIS_INCS)
30

Pedro Gonnet's avatar
Pedro Gonnet committed
31
# Set-up the library
32
bin_PROGRAMS = swift swift_fixdt
Pedro Gonnet's avatar
Pedro Gonnet committed
33

34
35
# Build MPI versions as well?
if HAVEMPI
36
bin_PROGRAMS += swift_mpi swift_fixdt_mpi
37
38
endif

39
40
41
42
43
# engine_policy_setaffinity is available?
if HAVESETAFFINITY
ENGINE_POLICY_SETAFFINITY=| engine_policy_setaffinity
else
ENGINE_POLICY_SETAFFINITY=
44
45
endif

46
47
# Sources for swift
swift_SOURCES = main.c
48
swift_CFLAGS = $(MYFLAGS) $(AM_CFLAGS) -DENGINE_POLICY="engine_policy_keep $(ENGINE_POLICY_SETAFFINITY)"
49
swift_LDADD =  ../src/.libs/libswiftsim.a $(HDF5_LDFLAGS) $(HDF5_LIBS)
Pedro Gonnet's avatar
Pedro Gonnet committed
50

51
52
53
54
swift_fixdt_SOURCES = main.c
swift_fixdt_CFLAGS = $(MYFLAGS) $(AM_CFLAGS) -DENGINE_POLICY="engine_policy_fixdt | engine_policy_keep $(ENGINE_POLICY_SETAFFINITY)"
swift_fixdt_LDADD =  ../src/.libs/libswiftsim.a $(HDF5_LDFLAGS) $(HDF5_LIBS)

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

60
swift_fixdt_mpi_SOURCES = main.c
61
swift_fixdt_mpi_CFLAGS = $(MYFLAGS) $(AM_CFLAGS) $(MPI_FLAGS) -DENGINE_POLICY="engine_policy_fixdt | engine_policy_keep $(ENGINE_POLICY_SETAFFINITY)"
62
63
swift_fixdt_mpi_LDADD =  ../src/.libs/libswiftsim_mpi.a $(HDF5_LDFLAGS) $(HDF5_LIBS) $(MPI_LIBS)

64
65
66
67
68
69
70
71
72
# Scripts to generate ICs
EXTRA_DIST = UniformBox/makeIC.py \
             PerturbedBox/makeIC.py \
	     SedovBlast/makeIC.py SedovBlast/makeIC_fcc.py SedovBlast/solution.py \
	     SodShock/makeIC.py SodShock/solution.py SodShock/glass_001.hdf5 SodShock/glass_002.hdf5 SodShock/rhox.py \
	     CosmoVolume/getIC.sh \
	     BigCosmoVolume/makeIC.py \
	     BigPerturbedBox/makeIC_fcc.py \
             GreshoVortex/makeIC.py GreshoVortex/solution.py