File: Makefile.am

package info (click to toggle)
gyoto 1.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,588 kB
  • sloc: cpp: 33,490; sh: 18,775; xml: 2,633; python: 1,424; makefile: 681; ansic: 314
file content (147 lines) | stat: -rw-r--r-- 5,029 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS = -I@top_srcdir@/include $(XERCES_CFLAGS) $(UDUNITS_CFLAGS) $(BOOST_CPPFLAGS) \
	-DPACKAGE_STRING="$(PACKAGE_STRING)"
AM_LDFLAGS  = $(XERCES_LIBS) $(PTHREAD_LIBS) $(LDFLAGS_EXEC)
AM_CXXFLAGS = $(PTHREAD_CFLAGS) $(CXXFLAGS_EXEC)
CLEANFILES =

bin_PROGRAMS  =
dist_man_MANS =

if BUILD_GYOTO
bin_PROGRAMS += gyoto
dist_man_MANS += gyoto.1
endif

if HAVE_MPI
AM_LDFLAGS += $(BOOST_MPI_LDFLAGS) $(BOOST_MPI_LIBS) \
	      $(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_SERIALIZATION_LIBS)
bin_PROGRAMS += gyoto-mpi-worker.@sovers@
dist_man_MANS += gyoto-mpi-worker.@sovers@.1
CLEANFILES += gyoto-mpi-worker.@sovers@.1
endif

gyoto_SOURCES = gyoto.C
gyoto_LDADD   = @top_builddir@/lib/libgyoto@FEATURES@.la
gyoto_CPPFLAGS = $(AM_CPPFLAGS) $(CFITSIO_CFLAGS)
gyoto_LDFLAGS  = $(AM_LDFLAGS) $(CFITSIO_LIBS) -export-dynamic

gyoto_mpi_worker_@sovers@_SOURCES = gyoto-mpi-worker.C
gyoto_mpi_worker_@sovers@_LDADD   = @top_builddir@/lib/libgyoto@FEATURES@.la
gyoto_mpi_worker_@sovers@_CPPFLAGS = $(AM_CPPFLAGS) $(CFITSIO_CFLAGS)
gyoto_mpi_worker_@sovers@_LDFLAGS  = $(AM_LDFLAGS) $(CFITSIO_LIBS) -export-dynamic

gyoto-mpi-worker.@sovers@.1: gyoto-mpi-worker.1
	cp $^ $@

export PATH := .:$(PATH)

EXAMPLE_DIR = $(top_srcdir)/doc/examples/
CHECK_RESULTS = \
        example-thin-disk.fits \
        example-thin-disk-KS.fits \
        example-thin-disk-minkowski-cartesian.fits \
        example-thin-disk-minkowski-spherical.fits \
        example-complex-astrobj.fits \
        example-fixed-star.fits \
        example-fixed-star-RZ.fits \
        example-fixed-star-minkowski-cartesian.fits \
        example-fixed-star-minkowski-spherical.fits \
        example-startrace.fits \
        example-moving-star.fits \
        example-moving-star-CS.fits \
        example-page-thorne-disk-BL.fits \
        example-page-thorne-disk-KS.fits \
        example-page-thorne-disk-BL-with-basis.fits \
        example-torus.fits \
        example-torus-KS.fits \
	example-oscil-torus.fits
if HAVE_UDUNITS
CHECK_RESULTS += \
        example-fixed-star-KS.fits \
        example-polish-doughnut.fits \
        example-polish-doughnut-hayward-wormhole.fits \
        example-polish-doughnut-RZ.fits
endif
if HAVE_2F1
CHECK_RESULTS += example-jet.fits
endif

CHECK_MPI_RESULTS = $(CHECK_RESULTS:.fits=-mpi.fits)
CLEANFILES += $(CHECK_RESULTS) $(CHECK_MPI_RESULTS)

MPIRUN = mpirun

CHECK_ENV = LD_LIBRARY_PATH=@top_builddir@/lib/.libs/:$(LD_LIBRARY_PATH)
CHECK_RAW_CMD = ./gyoto -pstdplug -r32 -T8 -P0
CHECK_CMD = $(CHECK_ENV) $(CHECK_RAW_CMD)

check-nompi-clean:
	rm -f $(CHECK_RESULTS)

check-mpi-clean:
	rm -f $(CHECK_MPI_RESULTS)

if BUILD_GYOTO
$(CHECK_RESULTS): gyoto $(EXAMPLE_DIR)$(@:.fits=.xml)
	$(CHECK_CMD) $(EXAMPLE_DIR)$(@:.fits=.xml) \!$@

$(CHECK_MPI_RESULTS): gyoto $(EXAMPLE_DIR)$(@:-mpi.fits=.xml)
	$(CHECK_ENV) $(MPIRUN) $(CHECK_RAW_CMD) -P4 $(EXAMPLE_DIR)$(@:-mpi.fits=.xml) \!$@

check-nompi-compute: $(CHECK_RESULTS)
check-nompi: check-nompi-clean check-nompi-compute

check-mpi-compute: $(CHECK_MPI_RESULTS)
check-mpi: check-mpi-clean check-mpi-compute

check: check-nompi

if HAVE_LORENE
# make check-lorene check-lorene-mpi
# Will
#   1- copy the Nrotstar directory from HOME_LORENE into .check-lorene;
#   2- configure Nrotstar by copying par_eos.d and par_rot.d from GR/Kepler;
#   3- build Nrotstar/nrotstar;
#   4- run it to build Nrotstar/resu.d;
#   5- ray-trace ../doc/examples/example-*-rotstar3_1.xml twice
#      (with and without MPI).

export HOME_LORENE
.check-lorene/resu.d:
	rm -Rf .check-lorene
	cp -a $(HOME_LORENE)/Codes/Nrotstar ./.check-lorene
	cd .check-lorene && rm -f nrotstar *.o
	cd .check-lorene && cp -f Parameters/GR/Kepler/*.d ./
	cd .check-lorene && $(SED) -i.bak 's/1       graph/0       graph/' par_rot.d
	cd .check-lorene && $(MAKE)
	cd .check-lorene && ./nrotstar

CHECK_ROTSTAR_RESULTS = example-movingstar-rotstar3_1.fits example-fixedstar-rotstar3_1.fits
CHECK_ROTSTAR_MPI_RESULTS = $(CHECK_ROTSTAR_RESULTS:.fits=-mpi.fits)
CLEANFILES += $(CHECK_ROTSTAR_RESULTS) $(CHECK_ROTSTAR_MPI_RESULTS)

$(CHECK_ROTSTAR_MPI_RESULTS): gyoto $(EXAMPLE_DIR)$(@:-mpi.fits=.xml) .check-lorene/resu.d
	$(CHECK_ENV) $(MPIRUN) $(CHECK_RAW_CMD) -pstdplug,lorene -P4 $(EXAMPLE_DIR)$(@:-mpi.fits=.xml) \!$@

$(CHECK_ROTSTAR_RESULTS): gyoto $(EXAMPLE_DIR)$(@:.fits=.xml) .check-lorene/resu.d
	$(CHECK_CMD) -pstdplug,lorene -T0 $(EXAMPLE_DIR)$(@:.fits=.xml) \!$@

check-lorene-clean:
	rm -f $(CHECK_ROTSTAR_RESULTS)
check-lorene-compute: $(CHECK_ROTSTAR_RESULTS)
check-lorene: check-lorene-clean check-lorene-compute

check-lorene-mpi-clean:
	rm -f $(CHECK_ROTSTAR_MPI_RESULTS)
check-lorene-mpi-compute: $(CHECK_ROTSTAR_MPI_RESULTS)
check-lorene-mpi: check-lorene-mpi-clean check-lorene-mpi-compute

endif

endif

clean-local:
	-rm -rf .check-lorene

.PHONY: check-nompi-compute check-nompi-clean check-nompi check-mpi-clean check-mpi-compute check-mpi check check-lorene-clean check-lorene-compute check-lorene check-lorene-mpi-clean check-lorene-mpi-compute check-lorene-mpi check