|
Packit |
0848f5 |
# -*- Mode: Makefile; -*-
|
|
Packit |
0848f5 |
# vim: set ft=automake :
|
|
Packit |
0848f5 |
#
|
|
Packit |
0848f5 |
# (C) 2011 by Argonne National Laboratory.
|
|
Packit |
0848f5 |
# See COPYRIGHT in top-level directory.
|
|
Packit |
0848f5 |
#
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
# FIXME should these be prefixed with AM_ under automake? Should we cut some or
|
|
Packit |
0848f5 |
# all of these?
|
|
Packit |
0848f5 |
MPICHDIR=..
|
|
Packit |
0848f5 |
#CC = $(MPICHDIR)/bin/mpicc
|
|
Packit |
0848f5 |
AM_CFLAGS = $(WRAPPER_CFLAGS)
|
|
Packit |
0848f5 |
CXXFLAGS = $(WRAPPER_CXXFLAGS)
|
|
Packit |
0848f5 |
FFLAGS = $(WRAPPER_FFLAGS)
|
|
Packit |
0848f5 |
FCFLAGS = $(WRAPPER_FCFLAGS)
|
|
Packit |
0848f5 |
AM_LDFLAGS =
|
|
Packit |
0848f5 |
AM_CPPFLAGS = $(WRAPPER_CPPFLAGS)
|
|
Packit |
0848f5 |
#DEFS =
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
AM_CPPFLAGS += -I$(top_builddir)/src/include -I${top_srcdir}/src/include
|
|
Packit |
0848f5 |
if BUILD_ROMIO
|
|
Packit |
0848f5 |
AM_CPPFLAGS += -I$(top_builddir)/src/mpi/romio/include -I${top_srcdir}/mpi/romio/include/include
|
|
Packit |
0848f5 |
endif BUILD_ROMIO
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
cpi_DEPENDENCIES =
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
# This directory of examples conceptually lives "outside" of the real MPICH
|
|
Packit |
0848f5 |
# build and so we add "-lblah" for MPICH libs instead of specifying
|
|
Packit |
0848f5 |
# "../lib/libblah.la" (this invocation of make has no way to cause it to be
|
|
Packit |
0848f5 |
# rebuilt).
|
|
Packit |
0848f5 |
#
|
|
Packit |
0848f5 |
# FIXME we add the core MPICH libs explicitly to cpi_DEPENDENCIES to force cpi
|
|
Packit |
0848f5 |
# to get rebuilt whenever MPICH's core libraries are rebuilt, but perhaps there
|
|
Packit |
0848f5 |
# is a better system?
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
# the make-time instances of libpmpi.la and libmpi.la live here
|
|
Packit |
0848f5 |
AM_LDFLAGS += -L../lib
|
|
Packit |
0848f5 |
# the make-time instances of libmpl.la and libopa.la live here
|
|
Packit |
0848f5 |
AM_LDFLAGS += @mpllibdir@ @opalibdir@
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
# Wrapper LDFLAGS need to be added at the end to make sure we link
|
|
Packit |
0848f5 |
# with the libraries we just built, and not any previously installed
|
|
Packit |
0848f5 |
# libraries.
|
|
Packit |
0848f5 |
AM_LDFLAGS += $(WRAPPER_LDFLAGS)
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
external_libs = $(WRAPPER_LIBS)
|
|
Packit |
0848f5 |
if BUILD_PROFILING_LIB
|
|
Packit |
0848f5 |
LIBS += -l@PMPILIBNAME@
|
|
Packit |
0848f5 |
cpi_DEPENDENCIES += ../lib/lib@PMPILIBNAME@.la
|
|
Packit |
0848f5 |
endif BUILD_PROFILING_LIB
|
|
Packit |
0848f5 |
LIBS += -l@MPILIBNAME@ $(external_libs)
|
|
Packit |
0848f5 |
cpi_DEPENDENCIES += ../lib/lib@MPILIBNAME@.la
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
noinst_PROGRAMS = cpi
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
# pmandel requires a separate set of socket calls (its a long story)
|
|
Packit |
0848f5 |
# and may not build on most platforms
|
|
Packit |
0848f5 |
EXTRA_PROGRAMS = pmandel pmandel_spawn pmandel_service pmandel_spaserv \
|
|
Packit |
0848f5 |
pmandel_fence hellow icpi ircpi parent child srtest \
|
|
Packit |
0848f5 |
spawn_merge_parent spawn_merge_child1 spawn_merge_child2
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
# LIBS includes -lmpich and other libraries (e.g., -lpmpich if
|
|
Packit |
0848f5 |
# weak symbols are not supported)
|
|
Packit |
0848f5 |
# FIXME is the above true under automake?
|
|
Packit |
0848f5 |
hellow_SOURCES = hellow.c
|
|
Packit |
0848f5 |
srtest_SOURCES = srtest.c
|
|
Packit |
0848f5 |
child_SOURCES = child.c
|
|
Packit |
0848f5 |
parent_SOURCES = parent.c
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
# "cpi" is special, we always build it at the end of the regular "make" process
|
|
Packit |
0848f5 |
# and its main purpose is to catch missing symbol link-time errors before any
|
|
Packit |
0848f5 |
# tests are run. So we add "-static" to its LDFLAGS in order to force this
|
|
Packit |
0848f5 |
# symbol resolution at build time instead of deferring it to run time as would
|
|
Packit |
0848f5 |
# occur in dynamic linking.
|
|
Packit |
0848f5 |
#
|
|
Packit |
0848f5 |
# TODO need to check that this works correctly if "--enable-shared
|
|
Packit |
0848f5 |
# --disable-static" is passed to configure.
|
|
Packit |
0848f5 |
cpi_SOURCES = cpi.c
|
|
Packit |
0848f5 |
cpi_LDADD = -lm
|
|
Packit |
0848f5 |
cpi_LDFLAGS = $(AM_LDFLAGS) $(mpich_libtool_static_flag)
|
|
Packit |
0848f5 |
|
|
Packit |
0848f5 |
icpi_SOURCES = icpi.c
|
|
Packit |
0848f5 |
icpi_LDADD = -lm
|
|
Packit |
0848f5 |
ircpi_SOURCES = ircpi.c
|
|
Packit |
0848f5 |
ircpi_LDADD = -lm
|
|
Packit |
0848f5 |
pmandel_SOURCES = pmandel.c
|
|
Packit |
0848f5 |
pmandel_LDADD = -lm
|
|
Packit |
0848f5 |
pmandel_spawn_SOURCES = pmandel_spawn.c
|
|
Packit |
0848f5 |
pmandel_spawn_LDADD = -lm
|
|
Packit |
0848f5 |
pmandel_service_SOURCES = pmandel_service.c
|
|
Packit |
0848f5 |
pmandel_service_LDADD = -lm
|
|
Packit |
0848f5 |
pmandel_spaserv_SOURCES = pmandel_spaserv.c
|
|
Packit |
0848f5 |
pmandel_spaserv_LDADD = -lm
|
|
Packit |
0848f5 |
pmandel_fence_SOURCES = pmandel_fence.c
|
|
Packit |
0848f5 |
pmandel_fence_LDADD = -lm
|
|
Packit |
0848f5 |
spawn_merge_parent_SOURCES = spawn_merge_parent.c
|
|
Packit |
0848f5 |
spawn_merge_child1_SOURCES = spawn_merge_child1.c
|
|
Packit |
0848f5 |
spawn_merge_child2_SOURCES = spawn_merge_child2.c
|