-
Notifications
You must be signed in to change notification settings - Fork 39
/
Makefile.am
634 lines (583 loc) · 25.7 KB
/
Makefile.am
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
AUTOMAKE_OPTIONS = foreign
SUBDIRS = src include scripts etc tests
if GENERATE_DOCUMENTATION
SUBDIRS += docs
endif
EXTRA_DIST = \
bootstrap \
ChangeLog \
example \
INSTALL-examples \
substitute \
substitute-all \
README.md \
README-DEEP.md
VPATH=@srcdir@
SRCDIR=@srcdir@
ACLOCAL_AMFLAGS=-I config
@SET_MAKE@
dist-hook:
rm -fr `find $(distdir) -name .svn`
#
# Create EXAMPLE directory and copy there the example
#
MPI_EXAMPLE_FILES=null
MPICUDA_EXAMPLE_FILES=null
OMP_EXAMPLE_FILES=null
MPIOMP_EXAMPLE_FILES=null
SEQ_EXAMPLE_FILES=null
ONLINE_EXAMPLE_FILES=null
PYTHON_EXAMPLE_FILES=null
PTHREAD_EXAMPLE_FILES=null
CUDA_EXAMPLE_FILES=null
OPENCL_EXAMPLE_FILES=null
MPIOPENCL_EXAMPLE_FILES=null
OMPSS_EXAMPLE_FILES=null
MPIOMPSS_EXAMPLE_FILES=null
JAVA_EXAMPLE_FILES=null
FORK_EXAMPLE_FILES=null
GASPI_EXAMPLE_FILES=null
GASPIOMP_EXAMPLE_FILES=null
OPENACC_EXAMPLE_FILES=null
MPIOPENACC_EXAMPLE_FILES=null
UNICORE_EXAMPLE_FILES= $(top_srcdir)/example/UNICORE/*
if IS_BG_MACHINE
if IS_BGL_MACHINE
MPI_EXAMPLE_FILES+=\
$(top_srcdir)/example/BGL/mpi_ping.f \
$(top_srcdir)/example/BGL/Makefile \
$(top_srcdir)/example/BGL/ll_merge.sh \
$(top_srcdir)/example/BGL/ll_trace.sh \
$(top_srcdir)/example/BGL/papi_bgl_counters.txt \
$(top_srcdir)/example/BGL/papi_native_bgl_counters.txt
endif
if IS_BGP_MACHINE
MPI_EXAMPLE_FILES+=\
$(top_srcdir)/example/BGP/ll_merge.sh \
$(top_srcdir)/example/BGP/ll_parmerge.sh \
$(top_srcdir)/example/BGP/Makefile \
$(top_srcdir)/example/BGP/ll_papi.sh \
$(top_srcdir)/example/BGP/ll_trace.sh \
$(top_srcdir)/example/BGP/mpi_ping.f \
$(top_srcdir)/example/BGP/papi_bgp_avail.txt \
$(top_srcdir)/example/BGP/papi_bgp_native_avail.txt
endif
if IS_BGQ_MACHINE
MPI_EXAMPLE_FILES+=\
$(top_srcdir)/example/BGQ/ll_merge.sh \
$(top_srcdir)/example/BGQ/ll_parmerge.sh \
$(top_srcdir)/example/BGQ/ll_trace.sh \
$(top_srcdir)/example/BGQ/Makefile \
$(top_srcdir)/example/BGQ/mpi_ping.f \
$(top_srcdir)/example/BGQ/papi_bgq_avail.txt \
$(top_srcdir)/example/BGQ/papi_bgq_native_avail.txt \
$(top_srcdir)/example/BGQ/extrae.xml
endif
endif
if OS_AIX
MPI_EXAMPLE_FILES+=\
$(top_srcdir)/example/AIX/Makefile \
$(top_srcdir)/example/AIX/merge.sh \
$(top_srcdir)/example/AIX/script.ll \
$(top_srcdir)/example/AIX/mpi_ping.f \
$(top_srcdir)/example/AIX/extrae_explained.xml \
$(top_srcdir)/example/AIX/extrae.xml \
$(top_srcdir)/example/AIX/detailed_trace_basic.xml \
$(top_srcdir)/example/AIX/summarized_trace_basic.xml
endif
if OS_FREEBSD
MPI_EXAMPLE_FILES+=\
$(top_srcdir)/example/FREEBSD/MPI/detailed_trace_basic.xml \
$(top_srcdir)/example/FREEBSD/MPI/summarized_trace_basic.xml \
$(top_srcdir)/example/FREEBSD/MPI/static/slurm_parallel_merge.sh \
$(top_srcdir)/example/FREEBSD/MPI/static/slurm_merge.sh \
$(top_srcdir)/example/FREEBSD/MPI/static/mpi_ping.f \
$(top_srcdir)/example/FREEBSD/MPI/static/mpi2prv.sh \
$(top_srcdir)/example/FREEBSD/MPI/static/Makefile \
$(top_srcdir)/example/FREEBSD/MPI/static/trace.sh \
$(top_srcdir)/example/FREEBSD/MPI/static/slurm_trace.sh \
$(top_srcdir)/example/FREEBSD/MPI/extrae_explained.xml \
$(top_srcdir)/example/FREEBSD/MPI/README \
$(top_srcdir)/example/FREEBSD/MPI/extrae.xml \
$(top_srcdir)/example/FREEBSD/MPI/ld-preload/slurm_parallel_merge.sh \
$(top_srcdir)/example/FREEBSD/MPI/ld-preload/slurm_merge.sh \
$(top_srcdir)/example/FREEBSD/MPI/ld-preload/mpi_ping.f \
$(top_srcdir)/example/FREEBSD/MPI/ld-preload/mpi2prv.sh \
$(top_srcdir)/example/FREEBSD/MPI/ld-preload/Makefile \
$(top_srcdir)/example/FREEBSD/MPI/ld-preload/trace.sh \
$(top_srcdir)/example/FREEBSD/MPI/ld-preload/slurm_trace.sh
OMP_EXAMPLE_FILES+=\
$(top_srcdir)/example/FREEBSD/OMP/pi.c \
$(top_srcdir)/example/FREEBSD/OMP/pi_instrumented.c \
$(top_srcdir)/example/FREEBSD/OMP/README \
$(top_srcdir)/example/FREEBSD/OMP/Makefile \
$(top_srcdir)/example/FREEBSD/OMP/extrae.xml \
$(top_srcdir)/example/FREEBSD/OMP/run_instrumented.sh \
$(top_srcdir)/example/FREEBSD/OMP/run_dyninst.sh \
$(top_srcdir)/example/FREEBSD/OMP/merge.sh
SEQ_EXAMPLE_FILES+=\
$(top_srcdir)/example/FREEBSD/SEQ/pi.c \
$(top_srcdir)/example/FREEBSD/SEQ/pi_instrumented.c \
$(top_srcdir)/example/FREEBSD/SEQ/pi_instrumented.f90 \
$(top_srcdir)/example/FREEBSD/SEQ/README \
$(top_srcdir)/example/FREEBSD/SEQ/Makefile \
$(top_srcdir)/example/FREEBSD/SEQ/extrae.xml \
$(top_srcdir)/example/FREEBSD/SEQ/run_instrumented.sh \
$(top_srcdir)/example/FREEBSD/SEQ/run_instrumentedf.sh \
$(top_srcdir)/example/FREEBSD/SEQ/function-list \
$(top_srcdir)/example/FREEBSD/SEQ/run_dyninst.sh
PTHREAD_EXAMPLE_FILES+=\
$(top_srcdir)/example/FREEBSD/PTHREAD/pthread-example.c \
$(top_srcdir)/example/FREEBSD/PTHREAD/README \
$(top_srcdir)/example/FREEBSD/PTHREAD/Makefile \
$(top_srcdir)/example/FREEBSD/PTHREAD/extrae.xml \
$(top_srcdir)/example/FREEBSD/PTHREAD/user-comms.c
JAVA_EXAMPLE_FILES+=\
$(top_srcdir)/example/FREEBSD/JAVA/manual
if WANT_JAVA_WITH_ASPECTJ
JAVA_EXAMPLE_FILES+=\
$(top_srcdir)/example/FREEBSD/JAVA/automatic
endif
endif
if OS_DARWIN
MPI_EXAMPLE_FILES+=\
$(top_srcdir)/example/FREEBSD/MPI/detailed_trace_basic.xml \
$(top_srcdir)/example/FREEBSD/MPI/summarized_trace_basic.xml \
$(top_srcdir)/example/FREEBSD/MPI/static/slurm_parallel_merge.sh \
$(top_srcdir)/example/FREEBSD/MPI/static/slurm_merge.sh \
$(top_srcdir)/example/FREEBSD/MPI/static/mpi_ping.f \
$(top_srcdir)/example/FREEBSD/MPI/static/mpi2prv.sh \
$(top_srcdir)/example/FREEBSD/MPI/static/Makefile \
$(top_srcdir)/example/FREEBSD/MPI/static/trace.sh \
$(top_srcdir)/example/FREEBSD/MPI/static/slurm_trace.sh \
$(top_srcdir)/example/FREEBSD/MPI/extrae_explained.xml \
$(top_srcdir)/example/FREEBSD/MPI/README \
$(top_srcdir)/example/FREEBSD/MPI/extrae.xml \
$(top_srcdir)/example/FREEBSD/MPI/ld-preload/slurm_parallel_merge.sh \
$(top_srcdir)/example/FREEBSD/MPI/ld-preload/slurm_merge.sh \
$(top_srcdir)/example/FREEBSD/MPI/ld-preload/mpi_ping.f \
$(top_srcdir)/example/FREEBSD/MPI/ld-preload/mpi2prv.sh \
$(top_srcdir)/example/FREEBSD/MPI/ld-preload/Makefile \
$(top_srcdir)/example/FREEBSD/MPI/ld-preload/trace.sh \
$(top_srcdir)/example/FREEBSD/MPI/ld-preload/slurm_trace.sh
OMP_EXAMPLE_FILES+=\
$(top_srcdir)/example/FREEBSD/OMP/pi.c \
$(top_srcdir)/example/FREEBSD/OMP/pi_instrumented.c \
$(top_srcdir)/example/FREEBSD/OMP/README \
$(top_srcdir)/example/FREEBSD/OMP/Makefile \
$(top_srcdir)/example/FREEBSD/OMP/extrae.xml \
$(top_srcdir)/example/FREEBSD/OMP/run_instrumented.sh \
$(top_srcdir)/example/FREEBSD/OMP/run_dyninst.sh \
$(top_srcdir)/example/FREEBSD/OMP/merge.sh
SEQ_EXAMPLE_FILES+=\
$(top_srcdir)/example/FREEBSD/SEQ/pi.c \
$(top_srcdir)/example/FREEBSD/SEQ/pi_instrumented.c \
$(top_srcdir)/example/FREEBSD/SEQ/README \
$(top_srcdir)/example/FREEBSD/SEQ/Makefile \
$(top_srcdir)/example/FREEBSD/SEQ/extrae.xml \
$(top_srcdir)/example/FREEBSD/SEQ/run_instrumented.sh \
$(top_srcdir)/example/FREEBSD/SEQ/function-list \
$(top_srcdir)/example/FREEBSD/SEQ/run_dyninst.sh
PTHREAD_EXAMPLE_FILES+=\
$(top_srcdir)/example/FREEBSD/PTHREAD/pthread-example.c \
$(top_srcdir)/example/FREEBSD/PTHREAD/README \
$(top_srcdir)/example/FREEBSD/PTHREAD/Makefile \
$(top_srcdir)/example/FREEBSD/PTHREAD/extrae.xml \
$(top_srcdir)/example/FREEBSD/PTHREAD/user-comms.c
JAVA_EXAMPLE_FILES+=\
$(top_srcdir)/example/FREEBSD/JAVA/manual
if WANT_JAVA_WITH_ASPECTJ
JAVA_EXAMPLE_FILES+=\
$(top_srcdir)/example/FREEBSD/JAVA/automatic
endif
OPENCL_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/OPENCL/README \
$(top_srcdir)/example/LINUX/OPENCL/C++ \
$(top_srcdir)/example/LINUX/OPENCL/C
MPIOPENCL_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/MPI+OPENCL/extrae.xml \
$(top_srcdir)/example/LINUX/MPI+OPENCL/Makefile \
$(top_srcdir)/example/LINUX/MPI+OPENCL/trace.sh \
$(top_srcdir)/example/LINUX/MPI+OPENCL/README \
$(top_srcdir)/example/LINUX/MPI+OPENCL/mpi-vadd.c
endif
if OS_LINUX
if !IS_BG_MACHINE
MPI_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/MPI/README \
$(top_srcdir)/example/LINUX/MPI/extrae.xml \
$(top_srcdir)/example/LINUX/MPI/detailed_trace_basic.xml \
$(top_srcdir)/example/LINUX/MPI/summarized_trace_basic.xml \
$(top_srcdir)/example/LINUX/MPI/extrae_explained.xml \
$(top_srcdir)/example/LINUX/MPI/extrae_bursts_1ms.xml \
$(top_srcdir)/example/LINUX/MPI/static \
$(top_srcdir)/example/LINUX/MPI/ld-preload \
$(top_srcdir)/example/LINUX/MPI/dyninst
MPICUDA_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/MPI+CUDA/ld-preload \
$(top_srcdir)/example/LINUX/MPI+CUDA/dyninst \
$(top_srcdir)/example/LINUX/MPI+CUDA/extrae.xml
OMP_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/OMP/extrae.xml \
$(top_srcdir)/example/LINUX/OMP/README \
$(top_srcdir)/example/LINUX/OMP/Makefile \
$(top_srcdir)/example/LINUX/OMP/pi.c \
$(top_srcdir)/example/LINUX/OMP/pi_instrumented.c \
$(top_srcdir)/example/LINUX/OMP/run_dyninst.sh \
$(top_srcdir)/example/LINUX/OMP/run_ldpreload.sh \
$(top_srcdir)/example/LINUX/OMP/run_instrumented.sh
MPIOMP_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/MPI+OMP/extrae.xml \
$(top_srcdir)/example/LINUX/MPI+OMP/README \
$(top_srcdir)/example/LINUX/MPI+OMP/ld-preload
SEQ_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/SEQ/extrae.xml \
$(top_srcdir)/example/LINUX/SEQ/function-list \
$(top_srcdir)/example/LINUX/SEQ/Makefile \
$(top_srcdir)/example/LINUX/SEQ/pi.c \
$(top_srcdir)/example/LINUX/SEQ/pi_instrumented.c \
$(top_srcdir)/example/LINUX/SEQ/pi_instrumented.f90 \
$(top_srcdir)/example/LINUX/SEQ/run_dyninst.sh \
$(top_srcdir)/example/LINUX/SEQ/run_instrumented.sh \
$(top_srcdir)/example/LINUX/SEQ/run_instrumentedf.sh \
$(top_srcdir)/example/LINUX/SEQ/README
ONLINE_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/ONLINE/Makefile \
$(top_srcdir)/example/LINUX/ONLINE/ping.c \
$(top_srcdir)/example/LINUX/ONLINE/extrae_online.xml \
$(top_srcdir)/example/LINUX/ONLINE/run_mn.sh \
$(top_srcdir)/example/LINUX/ONLINE/run_mt.sh \
$(top_srcdir)/example/LINUX/ONLINE/trace_online.sh \
$(top_srcdir)/example/LINUX/ONLINE/merge.sh \
$(top_srcdir)/example/LINUX/ONLINE/merge_parallel_mn.sh \
$(top_srcdir)/example/LINUX/ONLINE/merge_parallel_mt.sh \
$(top_srcdir)/example/LINUX/ONLINE/README
PYTHON_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/PYTHON/test.py \
$(top_srcdir)/example/LINUX/PYTHON/extrae.xml \
$(top_srcdir)/example/LINUX/PYTHON/function-list \
$(top_srcdir)/example/LINUX/PYTHON/run.sh
PTHREAD_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/PTHREAD/Makefile \
$(top_srcdir)/example/LINUX/PTHREAD/pthread-example.c \
$(top_srcdir)/example/LINUX/PTHREAD/user-comms.c \
$(top_srcdir)/example/LINUX/PTHREAD/extrae.xml \
$(top_srcdir)/example/LINUX/PTHREAD/README
CUDA_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/CUDA/extrae.xml \
$(top_srcdir)/example/LINUX/CUDA/hello.cu \
$(top_srcdir)/example/LINUX/CUDA/hello_instrumented.cu \
$(top_srcdir)/example/LINUX/CUDA/Makefile \
$(top_srcdir)/example/LINUX/CUDA/README \
$(top_srcdir)/example/LINUX/CUDA/run_ldpreload.sh \
$(top_srcdir)/example/LINUX/CUDA/run_dyninst.sh \
$(top_srcdir)/example/LINUX/CUDA/run_instrumented.sh
OPENCL_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/OPENCL/README \
$(top_srcdir)/example/LINUX/OPENCL/C++ \
$(top_srcdir)/example/LINUX/OPENCL/C
MPIOPENCL_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/MPI+OPENCL/extrae.xml \
$(top_srcdir)/example/LINUX/MPI+OPENCL/Makefile \
$(top_srcdir)/example/LINUX/MPI+OPENCL/trace.sh \
$(top_srcdir)/example/LINUX/MPI+OPENCL/README \
$(top_srcdir)/example/LINUX/MPI+OPENCL/mpi-vadd.c
OMPSS_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/OMPSS/extrae.xml \
$(top_srcdir)/example/LINUX/OMPSS/heat.h \
$(top_srcdir)/example/LINUX/OMPSS/heat-ompss.c \
$(top_srcdir)/example/LINUX/OMPSS/Makefile \
$(top_srcdir)/example/LINUX/OMPSS/misc.c \
$(top_srcdir)/example/LINUX/OMPSS/solver-ompss.c \
$(top_srcdir)/example/LINUX/OMPSS/trace.sh \
$(top_srcdir)/example/LINUX/OMPSS/job.lsf \
$(top_srcdir)/example/LINUX/OMPSS/test.dat
MPIOMPSS_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/MPI+OMPSS/extrae.xml \
$(top_srcdir)/example/LINUX/MPI+OMPSS/heat.h \
$(top_srcdir)/example/LINUX/MPI+OMPSS/heat-mpi-ompss.c \
$(top_srcdir)/example/LINUX/MPI+OMPSS/Makefile \
$(top_srcdir)/example/LINUX/MPI+OMPSS/misc.c \
$(top_srcdir)/example/LINUX/MPI+OMPSS/solver-mpi-ompss.c \
$(top_srcdir)/example/LINUX/MPI+OMPSS/trace.sh \
$(top_srcdir)/example/LINUX/MPI+OMPSS/job.lsf \
$(top_srcdir)/example/LINUX/MPI+OMPSS/test.dat
JAVA_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/JAVA/manual
if WANT_JAVA_WITH_ASPECTJ
JAVA_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/JAVA/automatic
endif
FORK_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/FORK/extrae.xml \
$(top_srcdir)/example/LINUX/FORK/function-list \
$(top_srcdir)/example/LINUX/FORK/Makefile \
$(top_srcdir)/example/LINUX/FORK/pi_forked.c \
$(top_srcdir)/example/LINUX/FORK/README \
$(top_srcdir)/example/LINUX/FORK/run_dyninst.sh
GASPI_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/GASPI/README \
$(top_srcdir)/example/LINUX/GASPI/extrae.xml \
$(top_srcdir)/example/LINUX/GASPI/ld-preload
GASPIOMP_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/GASPI+OMP/README \
$(top_srcdir)/example/LINUX/GASPI+OMP/extrae.xml \
$(top_srcdir)/example/LINUX/GASPI+OMP/ld-preload
OPENACC_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/OACC/extrae.xml \
$(top_srcdir)/example/LINUX/OACC/ld-preload
MPIOPENACC_EXAMPLE_FILES+=\
$(top_srcdir)/example/LINUX/MPI+OACC/extrae.xml \
$(top_srcdir)/example/LINUX/MPI+OACC/ld-preload
endif #!IS_BG_MACHINE
endif #OS_LINUX
install-data-hook:
touch null # To ease the installation rules
#
# Apply post-installation modifications
#
$(MKDIR_P) $(DESTDIR)$(datadir)/example
cp -f $(top_srcdir)/example/Makefile.inc $(DESTDIR)$(datadir)/example
#
# Apply substitutions
#
$(top_srcdir)/substitute $(SED) "@sub_MPI_HOME@" "${MPI_HOME}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_MPI_CFLAGS@" "${MPI_CFLAGS}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_MPI_LDFLAGS@" "${MPI_LDFLAGS}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_MPI_LIBS@" "${MPI_LIBS}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_PAPI_HOME@" "${PAPI_HOME}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_PAPI_LDFLAGS@" "${PAPI_LDFLAGS}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_PAPI_RPATH@" "${PAPI_RPATH}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_PAPI_LIBS@" "${PAPI_LIBS}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_UNWIND_HOME@" "${UNWIND_HOME}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_UNWIND_LDFLAGS@" "${UNWIND_LDFLAGS}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_UNWIND_RPATH@" "${UNWIND_RPATH}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_UNWIND_LIBS@" "${UNWIND_LIBS}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_XML2_HOME@" "${XML2_HOME}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_XML2_LDFLAGS@" "${XML2_LDFLAGS}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_XML2_RPATH@" "${XML2_RPATH}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_XML2_LIBS@" "${XML2_LIBS}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_BFD_HOME@" "${BFD_HOME}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_BFD_LDFLAGS@" "${BFD_LDFLAGS}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_BFD_RPATH@" "${BFD_RPATH}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_BFD_LIBS@" "${BFD_LIBS}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_LIBERTY_HOME@" "${LIBERTY_HOME}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_LIBERTY_LDFLAGS@" "${LIBERTY_LDFLAGS}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_LIBERTY_RPATH@" "${LIBERTY_RPATH}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_LIBERTY_LIBS@" "${LIBERTY_LIBS}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_ZLIB_HOME@" "${LIBZ_HOME}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_ZLIB_LDFLAGS@" "${LIBZ_LDFLAGS}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_ZLIB_RPATH@" "${LIBZ_RPATH}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_ZLIB_LIBS@" "${LIBZ_LIBS}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_DL_LIBS@" "${DL_LIBS}" $(DESTDIR)$(datadir)/example/Makefile.inc
if WANT_OPENCL
$(top_srcdir)/substitute $(SED) "@sub_OPENCL_HOME@" "${OPENCL_HOME}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_OPENCL_LDFLAGS@" "${OPENCL_LDFLAGS}" $(DESTDIR)$(datadir)/example/Makefile.inc
else
$(top_srcdir)/substitute $(SED) "@sub_OPENCL_HOME@" "" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_OPENCL_LDFLAGS@" "" $(DESTDIR)$(datadir)/example/Makefile.inc
endif
$(top_srcdir)/substitute $(SED) "@sub_POSIX_CLOCK@" "${POSIX_CLOCK_LIB}" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_CC@" "`which ${CC}`" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_CXX@" "`which ${CXX}`" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_FC@" "`which ${FC}`" $(DESTDIR)$(datadir)/example/Makefile.inc
if HAVE_MPI
$(top_srcdir)/substitute $(SED) "@sub_MPICC@" "`which ${MPICC}`" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_MPIF77@" "`which ${MPIF77}`" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_MPIF90@" "`which ${MPIF90}`" $(DESTDIR)$(datadir)/example/Makefile.inc
else
$(top_srcdir)/substitute $(SED) "@sub_MPICC@" "" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_MPIF77@" "" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_MPIF90@" "" $(DESTDIR)$(datadir)/example/Makefile.inc
endif
if HAVE_CUDA
$(top_srcdir)/substitute $(SED) "@sub_NVCC@" "${CUDA_BIN_nvcc}" $(DESTDIR)$(datadir)/example/Makefile.inc
else
$(top_srcdir)/substitute $(SED) "@sub_NVCC@" "" $(DESTDIR)$(datadir)/example/Makefile.inc
endif
if HAVE_GASPI
$(top_srcdir)/substitute $(SED) "@sub_GASPI_CFLAGS@" "@GASPI_CFLAGS@" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_GASPI_LDFLAGS@" "@GASPI_LDFLAGS@" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_GASPI_RPATH@" "@GASPI_RPATH@" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_GASPI_LIBS@" "@GASPI_LIBS@" $(DESTDIR)$(datadir)/example/Makefile.inc
else
$(top_srcdir)/substitute $(SED) "@sub_GASPI_CFLAGS@" "" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_GASPI_LDFLAGS@" "" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_GASPI_RPATH@" "" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_GASPI_LIBS@" "" $(DESTDIR)$(datadir)/example/Makefile.inc
endif
if WANT_OPENACC
$(top_srcdir)/substitute $(SED) "@sub_OPENACC_HOME@" "@OPENACC_HOME@" $(DESTDIR)$(datadir)/example/Makefile.inc
else
$(top_srcdir)/substitute $(SED) "@sub_OPENACC_HOME@" "" $(DESTDIR)$(datadir)/example/Makefile.inc
endif
if WANT_JAVA
$(top_srcdir)/substitute $(SED) "@sub_JAVAC@" "`which ${JAVAC}`" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_JAR@" "`which ${JAR}`" $(DESTDIR)$(datadir)/example/Makefile.inc
else
$(top_srcdir)/substitute $(SED) "@sub_JAVAC@" "" $(DESTDIR)$(datadir)/example/Makefile.inc
$(top_srcdir)/substitute $(SED) "@sub_JAR@" "" $(DESTDIR)$(datadir)/example/Makefile.inc
endif
# Apply post-installation modifications (FreeBSD specific)
if OS_FREEBSD
$(top_srcdir)/substitute $(SED) "@sub_libexecinfo_libs@" "${libexecinfo_LDFLAGS} -lexecinfo" $(DESTDIR)$(datadir)/example/Makefile.inc
else
$(top_srcdir)/substitute $(SED) "@sub_libexecinfo_libs@" "" $(DESTDIR)$(datadir)/example/Makefile.inc
endif
#
# Now copy examples
#
$(MKDIR_P) $(DESTDIR)$(datadir)/example/SEQ
cp -f $(SEQ_EXAMPLE_FILES) $(DESTDIR)$(datadir)/example/SEQ
cd $(DESTDIR)$(datadir)/example/SEQ ; cp ../Makefile.inc .
$(MKDIR_P) $(DESTDIR)$(datadir)/example/FORK
cp -f $(FORK_EXAMPLE_FILES) $(DESTDIR)$(datadir)/example/FORK
cd $(DESTDIR)$(datadir)/example/FORK ; cp ../Makefile.inc .
$(MKDIR_P) $(DESTDIR)$(datadir)/example/PYTHON
cp -f $(PYTHON_EXAMPLE_FILES) $(DESTDIR)$(datadir)/example/PYTHON
if HAVE_MPI
$(MKDIR_P) $(DESTDIR)$(datadir)/example/MPI
cp -fr $(MPI_EXAMPLE_FILES) $(DESTDIR)$(datadir)/example/MPI
cd $(DESTDIR)$(datadir)/example/MPI ; cp ../Makefile.inc .
if HAVE_CUDA
$(MKDIR_P) $(DESTDIR)$(datadir)/example/MPI+CUDA
cp -fr $(MPICUDA_EXAMPLE_FILES) $(DESTDIR)$(datadir)/example/MPI+CUDA
cd $(DESTDIR)$(datadir)/example/MPI+CUDA ; cp ../Makefile.inc .
endif
if WANT_OPENCL
$(MKDIR_P) $(DESTDIR)$(datadir)/example/MPI+OPENCL
cp -fr $(MPIOPENCL_EXAMPLE_FILES) $(DESTDIR)$(datadir)/example/MPI+OPENCL
cd $(DESTDIR)$(datadir)/example/MPI+OPENCL ; cp ../Makefile.inc .
endif
if WANT_NANOS
$(MKDIR_P) $(DESTDIR)$(datadir)/example/MPI+OMPSS
cp -fr $(MPIOMPSS_EXAMPLE_FILES) $(DESTDIR)$(datadir)/example/MPI+OMPSS
cd $(DESTDIR)$(datadir)/example/MPI+OMPSS ; cp ../Makefile.inc .
endif
if WANT_OPENMP
$(MKDIR_P) $(DESTDIR)$(datadir)/example/MPI+OMP
cp -fr $(MPIOMP_EXAMPLE_FILES) $(DESTDIR)$(datadir)/example/MPI+OMP
cd $(DESTDIR)$(datadir)/example/MPI+OMP ; cp ../Makefile.inc .
endif
if WANT_OPENACC
$(MKDIR_P) $(DESTDIR)$(datadir)/example/MPI+OACC
cp -fr $(MPIOPENACC_EXAMPLE_FILES) $(DESTDIR)$(datadir)/example/MPI+OACC
cd $(DESTDIR)$(datadir)/example/MPI+OACC ; cp ../Makefile.inc .
endif
endif
if WANT_OPENMP
$(MKDIR_P) $(DESTDIR)$(datadir)/example/OMP
cp -f $(OMP_EXAMPLE_FILES) $(DESTDIR)$(datadir)/example/OMP
cd $(DESTDIR)$(datadir)/example/OMP ; cp ../Makefile.inc .
endif
if HAVE_ONLINE
$(MKDIR_P) $(DESTDIR)$(datadir)/example/ONLINE
cp -f $(ONLINE_EXAMPLE_FILES) $(DESTDIR)$(datadir)/example/ONLINE
cd $(DESTDIR)$(datadir)/example/ONLINE ; cp ../Makefile.inc .
endif
if WANT_PTHREAD
$(MKDIR_P) $(DESTDIR)$(datadir)/example/PTHREAD
cp -f $(PTHREAD_EXAMPLE_FILES) $(DESTDIR)$(datadir)/example/PTHREAD
cd $(DESTDIR)$(datadir)/example/PTHREAD ; cp ../Makefile.inc .
endif
if HAVE_CUDA
$(MKDIR_P) $(DESTDIR)$(datadir)/example/CUDA
cp -f $(CUDA_EXAMPLE_FILES) $(DESTDIR)$(datadir)/example/CUDA
cd $(DESTDIR)$(datadir)/example/CUDA ; cp ../Makefile.inc .
endif
if WANT_OPENCL
$(MKDIR_P) $(DESTDIR)$(datadir)/example/OPENCL
cp -fr $(OPENCL_EXAMPLE_FILES) $(DESTDIR)$(datadir)/example/OPENCL
cd $(DESTDIR)$(datadir)/example/OPENCL ; cp ../Makefile.inc .
endif
if WANT_NANOS
$(MKDIR_P) $(DESTDIR)$(datadir)/example/OMPSS
cp -fr $(OMPSS_EXAMPLE_FILES) $(DESTDIR)$(datadir)/example/OMPSS
cd $(DESTDIR)$(datadir)/example/OMPSS ; cp ../Makefile.inc .
endif
if WANT_JAVA
$(MKDIR_P) $(DESTDIR)$(datadir)/example/JAVA
cp -fr $(JAVA_EXAMPLE_FILES) $(DESTDIR)$(datadir)/example/JAVA
cd $(DESTDIR)$(datadir)/example/JAVA ; cp ../Makefile.inc .
endif
if HAVE_GASPI
$(MKDIR_P) $(DESTDIR)$(datadir)/example/GASPI
cp -fr $(GASPI_EXAMPLE_FILES) $(DESTDIR)$(datadir)/example/GASPI
cd $(DESTDIR)$(datadir)/example/GASPI ; cp ../Makefile.inc .
$(MKDIR_P) $(DESTDIR)$(datadir)/example/GASPI+OMP
cp -fr $(GASPIOMP_EXAMPLE_FILES) $(DESTDIR)$(datadir)/example/GASPI+OMP
cd $(DESTDIR)$(datadir)/example/GASPI+OMP ; cp ../Makefile.inc .
endif
if WANT_OPENACC
$(MKDIR_P) $(DESTDIR)$(datadir)/example/OACC
cp -fr $(OPENACC_EXAMPLE_FILES) $(DESTDIR)$(datadir)/example/OACC
cd $(DESTDIR)$(datadir)/example/OACC ; cp ../Makefile.inc .
endif
$(MKDIR_P) $(DESTDIR)$(datadir)/example/UNICORE
cp -fr $(UNICORE_EXAMPLE_FILES) $(DESTDIR)$(datadir)/example/UNICORE
#
# Apply modifications to all directories installed
#
$(top_srcdir)/substitute-all $(SED) "@sub_PREFIXDIR@" "${prefix}" $(DESTDIR)$(datadir)/example
rm null # Remove null file created at the beginning
# SVN installations may have some subversion control files
find $(DESTDIR)$(datadir)/example -name .svn -delete
find $(DESTDIR)$(datadir)/example -name null -delete
uninstall-local:
rm -r $(DESTDIR)$(datadir)/example/SEQ \
$(DESTDIR)$(datadir)/example/FORK \
$(DESTDIR)$(datadir)/example/PYTHON
if HAVE_MPI
rm -r $(DESTDIR)$(datadir)/example/MPI
if HAVE_CUDA
rm -r $(DESTDIR)$(datadir)/example/MPI+CUDA
endif
if WANT_OPENCL
rm -r $(DESTDIR)$(datadir)/example/MPI+OPENCL
endif
if WANT_NANOS
rm -r $(DESTDIR)$(datadir)/example/MPI+OMPSS
endif
if WANT_OPENMP
rm -r $(DESTDIR)$(datadir)/example/MPI+OMP
endif
if WANT_OPENACC
rm -r $(DESTDIR)$(datadir)/example/MPI+OACC
endif
endif
if WANT_OPENMP
rm -r $(DESTDIR)$(datadir)/example/OMP
endif
if HAVE_ONLINE
rm -r $(DESTDIR)$(datadir)/example/ONLINE
endif
if WANT_PTHREAD
rm -r $(DESTDIR)$(datadir)/example/PTHREAD
endif
if HAVE_CUDA
rm -r $(DESTDIR)$(datadir)/example/CUDA
endif
if WANT_OPENCL
rm -r $(DESTDIR)$(datadir)/example/OPENCL
endif
if WANT_NANOS
rm -r $(DESTDIR)$(datadir)/example/OMPSS
endif
if WANT_JAVA
rm -r $(DESTDIR)$(datadir)/example/JAVA
endif
if HAVE_GASPI
rm -r $(DESTDIR)$(datadir)/example/GASPI
rm -r $(DESTDIR)$(datadir)/example/GASPI+OMP
endif
if WANT_OPENACC
rm -r $(DESTDIR)$(datadir)/example/OACC
endif
rm -r $(DESTDIR)$(datadir)/example/UNICORE
rm $(DESTDIR)$(datadir)/example/Makefile.inc
rmdir --ignore-fail-on-non-empty $(DESTDIR)$(datadir)/example
rmdir --ignore-fail-on-non-empty $(DESTDIR)$(bindir)
rmdir --ignore-fail-on-non-empty $(DESTDIR)$(libdir)
rmdir --ignore-fail-on-non-empty $(DESTDIR)$(libexecdir)
rmdir --ignore-fail-on-non-empty $(DESTDIR)$(datadir)
rmdir --ignore-fail-on-non-empty $(DESTDIR)$(prefix)