ftmemsim-valgrind/mpi/Makefile.am
Nicholas Nethercote b05a2a18d7 This commit merges the BUILD_TWEAKS branch onto the trunk. It has the
following improvements:

- Arch/OS/platform-specific files are now included/excluded via the
  preprocessor, rather than via the build system.  This is more consistent
  (we use the pre-processor for small arch/OS/platform-specific chunks
  within files) and makes the build system much simpler, as the sources for
  all programs are the same on all platforms.

- Vast amounts of cut+paste Makefile.am code has been factored out.  If a
  new platform is implemented, you need to add 11 extra Makefile.am lines.
  Previously it was over 100 lines.

- Vex has been autotoolised.  Dependency checking now works in Vex (no more
  incomplete builds).  Parallel builds now also work.  --with-vex no longer
  works;  it's little use and a pain to support.  VEX/Makefile is still in
  the Vex repository and gets overwritten at configure-time;  it should
  probably be renamed Makefile-gcc to avoid possible problems, such as
  accidentally committing a generated Makefile.  There's a bunch of hacky
  copying to deal with the fact that autotools don't handle same-named files
  in different directories.  Julian plans to rename the files to avoid this
  problem.

- Various small Makefile.am things have been made more standard automake
  style, eg. the use of pkginclude/pkglib prefixes instead of rolling our
  own.

- The existing five top-level Makefile.am include files have been
  consolidated into three.

- Most Makefile.am files now are structured more clearly, with comment
  headers separating sections, declarations relating to the same things next
  to each other, better spacing and layout, etc.

- Removed the unused exp-ptrcheck/tests/x86 directory.

- Renamed some XML files.

- Factored out some duplicated dSYM handling code.

- Split auxprogs/ into auxprogs/ and mpi/, which allowed the resulting
  Makefile.am files to be much more standard.

- Cleaned up m_coredump by merging a bunch of files that had been
  overzealously separated.

The net result is 630 fewer lines of Makefile.am code, or 897 if you exclude
the added Makefile.vex.am, or 997 once the hacky file copying for Vex is
removed.  And the build system is much simpler.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10364
2009-06-24 00:37:09 +00:00

83 lines
2.7 KiB
Makefile

include $(top_srcdir)/Makefile.all.am
# HACK WARNING: automake isn't good at supporting non-$(CC) compilers.
# But we need to use $(MPI_CC) for the MPI stuff. So we have this mpi stuff
# in its own directory so we can use the following blunt instruments, which
# override the C compiler and all the default flags.
CC = $(MPI_CC)
DEFS =
DEFAULT_INCLUDES =
CPPFLAGS =
CFLAGS =
LDFLAGS =
EXTRA_DIST = \
libmpiwrap_aix5.exp \
mpiwrap_type_test.c
#----------------------------------------------------------------------------
# libmpiwrap-<platform>.so
#----------------------------------------------------------------------------
noinst_PROGRAMS =
if BUILD_MPIWRAP_PRI
noinst_PROGRAMS += libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so
endif
if BUILD_MPIWRAP_SEC
noinst_PROGRAMS += libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so
endif
if VGCONF_OS_IS_DARWIN
noinst_DSYMS = $(noinst_PROGRAMS)
endif
if VGCONF_OS_IS_LINUX
CFLAGS_MPI = -g -O -fno-omit-frame-pointer -Wall -fpic
LDFLAGS_MPI = -fpic -shared
MPI_FLAG_M3264_PRI = $(AM_FLAG_M3264_PRI)
MPI_FLAG_M3264_SEC = $(AM_FLAG_M3264_SEC)
endif
if VGCONF_OS_IS_AIX5
# MPICC on AIX is called XLC. It uses weird options.
CFLAGS_MPI = -g -O -qflag=w:w -qlanglvl=extended
LDFLAGS_MPI = -bE:libmpiwrap_aix5.exp -bM:SRE -bnoentry \
-qflag=w:w -qlanglvl=extended
# The sed bit changes eg. "maix32" to "q32" which is the XLC option.
MPI_FLAG_M3264_PRI = `echo $(AM_FLAG_M3264_PRI) | sed s/maix/q/g`
MPI_FLAG_M3264_SEC = `echo $(AM_FLAG_M3264_SEC) | sed s/maix/q/g`
endif
if VGCONF_OS_IS_DARWIN
CFLAGS_MPI = -g -O -fno-omit-frame-pointer -Wall -dynamic
LDFLAGS_MPI = -dynamic -dynamiclib -all_load
MPI_FLAG_M3264_PRI = $(AM_FLAG_M3264_PRI)
MPI_FLAG_M3264_SEC = $(AM_FLAG_M3264_SEC)
endif
if BUILD_MPIWRAP_PRI
libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES = libmpiwrap.c
libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS = -I../include
libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CFLAGS = \
$(CFLAGS_MPI) $(MPI_FLAG_M3264_PRI)
libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS = $(LDFLAGS_MPI)
endif
if BUILD_MPIWRAP_SEC
libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES = libmpiwrap.c
libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS = -I../include
libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CFLAGS = \
$(CFLAGS_MPI) $(MPI_FLAG_M3264_SEC)
libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS = $(LDFLAGS_MPI)
endif
#----------------------------------------------------------------------------
# General stuff
#----------------------------------------------------------------------------
all-local: inplace-noinst_PROGRAMS inplace-noinst_DSYMS
clean-local: clean-noinst_DSYMS
install-exec-local: install-noinst_PROGRAMS install-noinst_DSYMS