Source

mpi3-fortran / ompi / contrib / vt / vt / vtlib / Makefile.am

Full commit
  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
if AMBUILDMPI
VTMPILIBRARY = libvt-mpi.la
else
VTMPILIBRARY =
endif

if AMBUILDMT
VTMTLIBRARY = libvt-mt.la
else
VTMTLIBRARY =
endif

if AMBUILDHYBRID
VTHYBLIBRARY = libvt-hyb.la
else
VTHYBLIBRARY =
endif

if AMBUILDJAVA
VTJAVALIBRARY = libvt-java.la
VTJAVAETCDATA = vt-java-default-filter.spec
if AMMACOS
install-exec-hook:
	(cd $(DESTDIR)$(libdir); \
	rm -f libvt-java.jnilib; \
	$(LN_S) libvt-java$(SHREXT) libvt-java.jnilib)
endif
else
VTJAVALIBRARY =
VTJAVAETCDATA =
endif

if AMBUILDOPARI
VTPOMPLIBRARY = libvt-pomp.la
else
VTPOMPLIBRARY =
endif

if AMBUILDFMPIWRAPLIB
VTFMPILIBRARY = libvt-fmpi.la
else
VTFMPILIBRARY =
endif

lib_LTLIBRARIES = \
	libvt.la \
	$(VTMPILIBRARY) \
	$(VTMTLIBRARY) \
	$(VTHYBLIBRARY) \
	$(VTJAVALIBRARY) \
	$(VTPOMPLIBRARY) \
	$(VTFMPILIBRARY)

if AMEXTERNOTF
OTFCFLAGS = $(OTFINCDIR)
OTFLIBRARY = $(OTFLIBDIR) $(OTFLIB)
OTFDEPENDENCIES =
else
OTFCFLAGS = -I$(top_srcdir)/extlib/otf/otflib -I$(top_builddir)/extlib/otf/otflib
OTFLIBRARY = $(top_builddir)/extlib/otf/otflib/libotf.la
OTFDEPENDENCIES = $(OTFLIBRARY)
endif

if AMBUILDMPIUNIFYLIB
VTMPIUNIFYLIBSOURCES = 
VTMPIUNIFYLIBCFLAGS = -DVT_MPIUNIFYLIB -I$(top_srcdir)/tools/vtunify/mpi -I$(top_builddir)/tools/vtunify/mpi
VTMPIUNIFYLIBLIBRARY = $(top_builddir)/tools/vtunify/mpi/libvt-mpi-unify.la
VTMPIUNIFYLIBDEPENDENCIES = $(VTMPIUNIFYLIBLIBRARY)
$(VTMPIUNIFYLIBLIBRARY):
	@($(am__cd) $(top_builddir)/tools/vtunify/mpi && $(MAKE) $(AM_MAKEFLAGS) libvt-mpi-unify.la)
install-exec-hook-pre:
	@($(am__cd) $(top_builddir)/tools/vtunify/mpi && $(MAKE) $(AM_MAKEFLAGS) install)
install: install-exec-hook-pre
	@$(MAKE) $(AM_MAKEFLAGS) install-am
else
VTMPIUNIFYLIBCFLAGS =
VTMPIUNIFYLIBLIBRARY =
VTMPIUNIFYLIBDEPENDENCIES =
endif

if AMHAVEPTHREAD
PTHREADSOURCES = vt_pthreadreg.c vt_pthreadwrap.c
PTHREADCFLAGS = -DVT_PTHREAD
else
PTHREADSOURCES =
PTHREADCFLAGS =
endif

if AMHAVEOMP
OMPSOURCES = vt_ompreg.c
OMPCFLAGS = -DVT_OMP
else
OMPSOURCES =
OMPCFLAGS =
endif

if AMHAVETHREADS
if AMTHRDPTHREAD
THRDSOURCES = vt_thrd_pthread.c 
THRDCFLAGS = -DVT_THRD_PTHREAD $(PTHREAD_CFLAGS)
endif
if AMTHRDOMP
THRDSOURCES = vt_thrd_omp.c
THRDCFLAGS = -DVT_THRD_OMP $(OPENMP_CFLAGS)
endif
else
THRDSOURCES =
THRDCFLAGS =
endif

if AMHAVEMPI2CONST
FMPI2CONSTSOURCES = vt_fmpiconst_2.f
else
FMPI2CONSTSOURCES =
endif

if AMHAVEMPI2IO
MPI2IOSOURCES = vt_mpifile.c
else
MPI2IOSOURCES =
endif

if AMBUILDETIMESYNC
ETIMESYNCSOURCES = vt_esync.c
ETIMESYNCCFLAGS = -DVT_ETIMESYNC
else
ETIMESYNCSOURCES =
ETIMESYNCCFLAGS =
endif

if AMHAVEIOFSL
IOFSLSOURCES = vt_iofsl.c
IOFSLCFLAGS = -DVT_IOFSL
else
IOFSLSOURCES =
IOFSLCFLAGS =
endif

if AMHAVEUNIMCI
UNIMCISOURCES = vt_unimci.c
UNIMCICFLAGS = -DVT_UNIMCI $(UNIMCI_CFLAGS)
else
UNIMCISOURCES =
UNIMCICFLAGS =
endif

if AMBUILDLIBWRAP
LIBWRAPSOURCES = vt_libwrap.c
LIBWRAPCFLAGS = -DVT_LIBWRAP
else
LIBWRAPSOURCES =
LIBWRAPCFLAGS =
endif

if AMBUILDLIBCWRAP
LIBCWRAPSOURCES = vt_libcwrap.c
LIBCWRAPCFLAGS = -DVT_LIBCWRAP
else
LIBCWRAPSOURCES =
LIBCWRAPCFLAGS =
endif

if AMHAVEFORK
FORKSOURCES = vt_fork.c
else
FORKSOURCES =
endif

if AMBUILDIOWRAP
IOWRAPSOURCES = vt_iowrap.c vt_iowrap_helper.c
IOWRAPCFLAGS = -DVT_IOWRAP
else
IOWRAPSOURCES =
IOWRAPCFLAGS =
endif

if AMHAVEGPU
GPUSOURCES = vt_gpu.c
GPUHEADERS = vt_gpu.h
GPUCFLAGS = -DVT_GPU
GPULIBRARY =

if AMBUILDCUDA
GPUHEADERS += vt_cuda_driver_api.h
GPUCFLAGS += -DVT_CUDA $(CUDATKINCDIR)
endif

if AMHAVELIBERTY
GPUCFLAGS += -DVT_LIBERTY $(LIBERTYINCDIR)
GPULIBRARY += $(LIBERTYLIBDIR) $(LIBERTYLIB)
endif

if AMBUILDLIBWRAP
if AMBUILDCUDARTWRAP
GPUSOURCES += vt_cudartwrap.c vt_cudart.c
GPUHEADERS += vt_cudartwrap.h vt_cuda_runtime_api.h
GPUCFLAGS += -DVT_CUDARTWRAP
if !AMBUILDCUDA
GPUCFLAGS += $(CUDATKINCDIR)
endif
endif
endif

if AMBUILDCUPTI
GPUSOURCES += vt_cupti.c
GPUHEADERS += vt_cupti.h
GPULIBRARY += $(CUPTILIBDIR) $(CUPTILIB)
GPUCFLAGS += -DVT_CUPTI $(CUPTIINCDIR)
if AMHAVECUPTIEVENTS
GPUSOURCES += vt_cupti_events.c
GPUHEADERS += vt_cupti_events.h
GPUCFLAGS += -DVT_CUPTI_EVENTS
endif
if AMHAVECUPTICALLBACKS
GPUSOURCES += vt_cupti_callback.c
GPUHEADERS += vt_cupti_callback.h
GPUCFLAGS += -DVT_CUPTI_CALLBACKS
endif
if AMHAVECUPTIACTIVITY
GPUSOURCES += vt_cupti_activity.c
GPUHEADERS += vt_cupti_activity.h
GPUCFLAGS += -DVT_CUPTI_ACTIVITY
endif
endif

else
GPUSOURCES = 
GPUHEADERS = 
GPUCFLAGS = 
GPULIBRARY =
endif

if AMHAVEMEMHOOKS
MEMHOOKSOURCES = vt_memhook.c
MEMHOOKCFLAGS = -DVT_MEMHOOK
else
MEMHOOKSOURCES =
MEMHOOKCFLAGS =
endif

if AMHAVEGETCPU
GETCPUSOURCES = vt_getcpu.c
GETCPUCFLAGS = -DVT_GETCPU
else
GETCPUSOURCES =
GETCPUCFLAGS =
endif

if AMHAVERUSAGE
RUSAGESOURCES = vt_rusage.c
RUSAGECFLAGS = -DVT_RUSAGE
else
RUSAGESOURCES =
RUSAGECFLAGS =
endif

if AMHAVEPLUGINCNTR
PLUGINCNTRSOURCES = vt_plugin_cntr.c
PLUGINCNTRCFLAGS = -DVT_PLUGIN_CNTR
else
PLUGINCNTRSOURCES =
PLUGINCNTRCFLAGS =
endif

if AMHAVEMETRICS
if AMHAVEPAPI
METRSOURCES = vt_metric_papi.c
METRCFLAGS = -DVT_METR=\"PAPI\" $(PAPIINCDIR)
METRLIBRARY = $(PAPILIBDIR) $(PAPILIB)
endif
if AMHAVECPC
METRSOURCES = vt_metric_cpc.c
METRCFLAGS = -DVT_METR=\"CPC\" $(CPCINCDIR)
METRLIBRARY = $(CPCLIBDIR) $(CPCLIB)
endif
if AMHAVENECSXCNTR
METRSOURCES = vt_metric_necsx.c vt_metric_necsx_1.s
METRCFLAGS = -DVT_METR=\"NECSX\"
METRLIBRARY =
endif
else
METRSOURCES =
METRCFLAGS =
METRLIBRARY =
endif

if AMHAVECOMPINST
if AMBUILDCOMPINST_GNU
COMPINSTSOURCES = vt_comp_gnu.c
COMPINSTCFLAGS =
endif
if AMBUILDCOMPINST_CRAYCCE
COMPINSTSOURCES = vt_comp_gnu.c
COMPINSTCFLAGS = -DVT_COMPINST_CRAYCCE
endif
if AMBUILDCOMPINST_PGI
COMPINSTSOURCES = vt_comp_pgi.c
COMPINSTCFLAGS =
endif
if AMBUILDCOMPINST_PHAT
COMPINSTSOURCES = vt_comp_phat.c
COMPINSTCFLAGS =
endif
if AMBUILDCOMPINST_XL
COMPINSTSOURCES = vt_comp_xl.c
COMPINSTCFLAGS =
endif
if AMBUILDCOMPINST_FTRACE
COMPINSTSOURCES = vt_comp_ftrace.c vt_comp_ftrace_1.s
COMPINSTCFLAGS =
endif
if AMBUILDCOMPINST_OPENUH
COMPINSTSOURCES = vt_comp_openuh.c
COMPINSTCFLAGS =
endif
else
COMPINSTSOURCES =
COMPINSTCFLAGS =
endif

if AMHAVEDYNINST
DYNINSTSOURCES = vt_dyninst.c
else
DYNINSTSOURCES =
endif

if AMHAVEDL
DLCFLAGS = $(DLINCDIR)
DLLIBRARY = $(DLLIBDIR) $(DLLIB)
else
DLCFLAGS =
DLLIBRARY =
endif

if AMHAVEMATH
MATHLIBRARY = $(MATHLIB)
else
MATHLIBRARY =
endif

VT_COMMON_SOURCES = \
	vt_comp.h \
	$(GPUHEADERS) \
	vt_defs.h \
	vt_demangle.h \
	vt_env.h \
	vt_error.h \
	vt_esync.h \
	vt_fbindings.h \
	vt_fork.h \
	vt_getcpu.h \
	vt_iofsl.h \
	vt_iowrap.h \
	vt_iowrap_helper.h \
	vt_java.h \
	vt_libcwrap.h \
	vt_memhook.h \
	vt_metric.h \
	vt_mpicom.h \
	vt_mpifile.h \
	vt_mpireg.h \
	vt_mpireq.h \
	vt_ompreg.h \
	vt_otf_gen.h \
	vt_otf_sum.h \
	vt_pform.h \
	vt_plugin_cntr_int.h \
	vt_pthreadreg.h \
	vt_rusage.h \
	vt_sync.h \
	vt_thrd.h \
	vt_trc.h \
	vt_unimci.h \
	$(COMPINSTSOURCES) \
	$(DYNINSTSOURCES) \
	$(GETCPUSOURCES) \
	$(GPUSOURCES) \
	$(IOWRAPSOURCES) \
	$(LIBWRAPSOURCES) \
	$(LIBCWRAPSOURCES) \
	$(MEMHOOKSOURCES) \
	$(METRSOURCES) \
	$(PLUGINCNTRSOURCES) \
	$(RUSAGESOURCES) \
	vt_env.c \
	vt_error.c \
	vt_fbindings.c \
	vt_otf_gen.c \
	vt_otf_sum.c \
	vt_pform_@PLATFORM@.c \
	vt_thrd.c \
	vt_trc.c \
	vt_user_comment.c \
	vt_user_control.c \
	vt_user_count.c \
	vt_user_marker.c \
	vt_user_message.c \
	vt_user_region.c

VT_SEQ_SOURCES = \
	$(FORKSOURCES)

VT_MPI_SOURCES = \
	vt_mpicom.c \
	vt_mpireg.c \
	vt_mpireq.c \
	vt_mpiwrap.c \
	vt_sync.c \
	$(MPI2IOSOURCES) \
	$(ETIMESYNCSOURCES) \
	$(IOFSLSOURCES) \
	$(UNIMCISOURCES)

VT_MT_SOURCES = \
	$(THRDSOURCES) \
	$(PTHREADSOURCES) \
	$(OMPSOURCES)

VT_HYB_SOURCES = \
	$(VT_MPI_SOURCES) \
	$(VT_MT_SOURCES)

VT_JAVA_SOURCES = \
	vt_jvmti.h \
	vt_java.c \
	vt_thrd_java.c

VT_POMP_SOURCES = \
	vt_pomp.h \
	vt_pomp.c \
	vt_fpomp.c

VT_FMPI_SOURCES = \
	vt_fmpiconst.h \
	vt_fmpiconst.c \
	vt_fmpiwrap.c \
	vt_fmpiconst_1.f \
	$(FMPI2CONSTSOURCES)

CC = $(MPICC)
AM_CFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/rfg $(OTFCFLAGS) $(DLCFLAGS) $(COMPINSTCFLAGS) $(LIBWRAPCFLAGS) $(GPUCFLAGS) $(LIBCWRAPCFLAGS) $(IOWRAPCFLAGS) $(MEMHOOKCFLAGS) $(GETCPUCFLAGS) $(RUSAGECFLAGS) $(METRCFLAGS) $(PLUGINCNTRCFLAGS)

libvt_la_LIBADD = $(top_builddir)/util/libvt_util.la $(top_builddir)/rfg/libvt_rfg.la $(OTFLIBRARY) $(METRLIBRARY) $(GPULIBRARY) $(DLLIBRARY) $(MATHLIBRARY)
libvt_la_DEPENDENCIES = $(top_builddir)/util/libvt_util.la $(top_builddir)/rfg/libvt_rfg.la $(OTFDEPENDENCIES)
libvt_la_SOURCES = $(VT_COMMON_SOURCES) $(VT_SEQ_SOURCES)

libvt_mpi_la_CFLAGS = -DVT_MPI $(AM_CFLAGS) $(MPICFLAGS) $(MPIINCDIR) $(VTMPIUNIFYLIBCFLAGS) $(ETIMESYNCCFLAGS) $(IOFSLCFLAGS) $(UNIMCICFLAGS)
libvt_mpi_la_LIBADD = $(top_builddir)/util/libvt_util.la $(top_builddir)/rfg/libvt_rfg.la $(OTFLIBRARY) $(VTMPIUNIFYLIBLIBRARY) $(MPILIBDIR) $(PMPILIB) $(METRLIBRARY) $(GPULIBRARY) $(DLLIBRARY) $(MATHLIBRARY)
libvt_mpi_la_DEPENDENCIES = $(top_builddir)/util/libvt_util.la $(top_builddir)/rfg/libvt_rfg.la $(OTFDEPENDENCIES) $(VTMPIUNIFYLIBDEPENDENCIES)
libvt_mpi_la_SOURCES = $(VT_COMMON_SOURCES) $(VT_MPI_SOURCES)

libvt_mt_la_CFLAGS = -DVT_MT $(AM_CFLAGS) $(PTHREADCFLAGS) $(OMPCFLAGS) $(THRDCFLAGS)
libvt_mt_la_LIBADD = $(top_builddir)/util/libvt_util.la $(top_builddir)/rfg/libvt_rfg.la $(OTFLIBRARY) $(METRLIBRARY) $(GPULIBRARY) $(DLLIBRARY) $(MATHLIBRARY)
libvt_mt_la_DEPENDENCIES = $(top_builddir)/util/libvt_util.la $(top_builddir)/rfg/libvt_rfg.la $(OTFDEPENDENCIES)
libvt_mt_la_SOURCES = $(VT_COMMON_SOURCES) $(VT_MT_SOURCES)

libvt_hyb_la_CFLAGS = -DVT_HYB $(AM_CFLAGS) $(MPICFLAGS) $(MPIINCDIR) $(VTMPIUNIFYLIBCFLAGS) $(PTHREADCFLAGS) $(OMPCFLAGS) $(THRDCFLAGS) $(ETIMESYNCCFLAGS) $(IOFSLCFLAGS) $(UNIMCICFLAGS)
libvt_hyb_la_LIBADD = $(top_builddir)/util/libvt_util.la $(top_builddir)/rfg/libvt_rfg.la $(OTFLIBRARY) $(VTMPIUNIFYLIBLIBRARY) $(MPILIBDIR) $(PMPILIB) $(METRLIBRARY) $(GPULIBRARY) $(DLLIBRARY) $(MATHLIBRARY)
libvt_hyb_la_DEPENDENCIES = $(top_builddir)/util/libvt_util.la $(top_builddir)/rfg/libvt_rfg.la $(OTFDEPENDENCIES) $(VTMPIUNIFYLIBDEPENDENCIES)
libvt_hyb_la_SOURCES = $(VT_COMMON_SOURCES) $(VT_HYB_SOURCES)

libvt_java_la_CFLAGS = -DVT_JAVA $(AM_CFLAGS) $(JVMTIINCDIR)
libvt_java_la_LDFLAGS = -shared
libvt_java_la_LIBADD = $(top_builddir)/util/libvt_util.la $(top_builddir)/rfg/libvt_rfg.la $(OTFLIBRARY) $(METRLIBRARY) $(GPULIBRARY)
libvt_java_la_DEPENDENCIES = $(top_builddir)/util/libvt_util.la $(top_builddir)/rfg/libvt_rfg.la $(OTFDEPENDENCIES)
libvt_java_la_SOURCES = $(VT_COMMON_SOURCES) $(VT_JAVA_SOURCES)

libvt_pomp_la_CFLAGS = -static -prefer-pic $(AM_CFLAGS) $(OPENMP_CFLAGS) -I$(top_srcdir)/tools/opari/lib
libvt_pomp_la_LDFLAGS = -static
libvt_pomp_la_SOURCES = $(VT_POMP_SOURCES)

F77 = $(MPIFC)
libvt_fmpi_la_CFLAGS = $(libvt_mpi_la_CFLAGS)
libvt_fmpi_la_FFLAGS = $(MPIFCFLAGS) $(FMPIINCDIR)
libvt_fmpi_la_SOURCES = $(VT_FMPI_SOURCES)

vtsysconf_DATA = \
	$(VTJAVAETCDATA)
vtsysconfdir = $(sysconfdir)

EXTRA_DIST = \
	vt_pform_altix.c \
	vt_pform_bgl.c \
	vt_pform_bgp.c \
	vt_pform_bgq.c \
	vt_pform_crayt3e.c \
	vt_pform_crayx1.c \
	vt_pform_crayxe.c \
	vt_pform_crayxt.c \
	vt_pform_generic.c \
	vt_pform_ibm.c \
	vt_pform_linux.c \
	vt_pform_macos.c \
	vt_pform_necsx.c \
	vt_pform_origin.c \
	vt_pform_sicortex.c \
	vt_pform_sun.c \
	vt-java-default-filter.spec

DISTCLEANFILES = \
	vt_mpireg.gen.c \
	vt_mpireg.gen.h \
	vt_mpiwrap.gen.c \
	vt_fmpiwrap.gen.c