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

2
# This file is part of SWIFT.
3
4
# Coypright (c) 2012 Pedro Gonnet (pedro.gonnet@durham.ac.uk),
#                    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 = -Wall -Werror -I../src -DCPU_TPS=2.67e9
Pedro Gonnet's avatar
Pedro Gonnet committed
24

25
26
27
28
29
AM_LDFLAGS =

METIS_LIBS = @METIS_LIBS@
MPI_THREAD_LIBS = @MPI_THREAD_LIBS@
MPI_LIBS = $(METIS_LIBS) $(MPI_THREAD_LIBS)
30

Pedro Gonnet's avatar
Pedro Gonnet committed
31
# Set-up the library
Pedro Gonnet's avatar
Pedro Gonnet committed
32
bin_PROGRAMS = test test_fixdt test_mindt test_single
Pedro Gonnet's avatar
Pedro Gonnet committed
33

34
35
36
37
38
# Build MPI versions as well?
if HAVEMPI
bin_PROGRAMS += test_mpi test_fixdt_mpi test_mindt_mpi
endif

Pedro Gonnet's avatar
Pedro Gonnet committed
39
40
# Sources for test
test_SOURCES = test.c
41
test_CFLAGS = $(MYFLAGS) $(AM_CFLAGS) -DENGINE_POLICY="engine_policy_multistep | engine_policy_keep | engine_policy_setaffinity"
42
test_LDADD =  ../src/.libs/libswiftsim.a $(HDF5_LDFLAGS) $(HDF5_LIBS)
Pedro Gonnet's avatar
Pedro Gonnet committed
43

Pedro Gonnet's avatar
Pedro Gonnet committed
44
45
# Sources for test_fixdt
test_fixdt_SOURCES = test.c
46
test_fixdt_CFLAGS = $(MYFLAGS) $(AM_CFLAGS) -DENGINE_POLICY="engine_policy_fixdt | engine_policy_keep | engine_policy_setaffinity"
47
test_fixdt_LDADD =  ../src/.libs/libswiftsim.a $(HDF5_LDFLAGS) $(HDF5_LIBS)
Pedro Gonnet's avatar
Pedro Gonnet committed
48
49
50

# Sources for test_mindt
test_mindt_SOURCES = test.c
51
test_mindt_CFLAGS = $(MYFLAGS) $(AM_CFLAGS) -DENGINE_POLICY="engine_policy_keep | engine_policy_setaffinity"
52
test_mindt_LDADD =  ../src/.libs/libswiftsim.a $(HDF5_LDFLAGS) $(HDF5_LIBS)
53

54
55
56
# Sources for test_mpi
test_mpi_SOURCES = test.c
test_mpi_CFLAGS = $(MYFLAGS) $(AM_CFLAGS) -DWITH_MPI -DENGINE_POLICY="engine_policy_multistep | engine_policy_keep"
57
test_mpi_LDADD =  ../src/.libs/libswiftsim_mpi.a $(HDF5_LDFLAGS) $(HDF5_LIBS) $(MPI_LIBS)
58
59
60
61

# Sources for test_fixdt_mpi
test_fixdt_mpi_SOURCES = test.c
test_fixdt_mpi_CFLAGS = $(MYFLAGS) $(AM_CFLAGS) -DWITH_MPI -DENGINE_POLICY="engine_policy_fixdt | engine_policy_keep"
62
test_fixdt_mpi_LDADD =  ../src/.libs/libswiftsim_mpi.a $(HDF5_LDFLAGS) $(HDF5_LIBS) $(MPI_LIBS)
63
64
65
66

# Sources for test_mindt_mpi
test_mindt_mpi_SOURCES = test.c
test_mindt_mpi_CFLAGS = $(MYFLAGS) $(AM_CFLAGS) -DWITH_MPI -DENGINE_POLICY="engine_policy_keep"
67
test_mindt_mpi_LDADD =  ../src/.libs/libswiftsim_mpi.a $(HDF5_LDFLAGS) $(HDF5_LIBS) $(MPI_LIBS)
68

69
70
# Sources for test_single
test_single_SOURCES = test_single.c
Pedro Gonnet's avatar
Pedro Gonnet committed
71
test_single_CFLAGS = $(MYFLAGS) $(AM_CFLAGS)
72
test_single_LDADD =  ../src/.libs/libswiftsim.a $(HDF5_LDFLAGS) $(HDF5_LIBS)
73