blob: 709c0a4252e69542bc219b22b06ce920f6f86bb2 [file] [log] [blame]
njn8b68b642009-06-24 00:37:09 +00001include $(top_srcdir)/Makefile.all.am
2
3# HACK WARNING: automake isn't good at supporting non-$(CC) compilers.
4# But we need to use $(MPI_CC) for the MPI stuff. So we have this mpi stuff
5# in its own directory so we can use the following blunt instruments, which
6# override the C compiler and all the default flags.
7CC = $(MPI_CC)
8DEFS =
9DEFAULT_INCLUDES =
10CPPFLAGS =
11CFLAGS =
12LDFLAGS =
13
14EXTRA_DIST = \
njn8b68b642009-06-24 00:37:09 +000015 mpiwrap_type_test.c
16
17#----------------------------------------------------------------------------
18# libmpiwrap-<platform>.so
19#----------------------------------------------------------------------------
20
21noinst_PROGRAMS =
22if BUILD_MPIWRAP_PRI
23noinst_PROGRAMS += libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so
24endif
25if BUILD_MPIWRAP_SEC
26noinst_PROGRAMS += libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so
27endif
28
29if VGCONF_OS_IS_DARWIN
30noinst_DSYMS = $(noinst_PROGRAMS)
31endif
32
33
philippef7c54332012-05-17 15:32:54 +000034## NOTE: this logic, the AM_FLAG_M3264_ logic in ../Makefile.all.am, and the
35## mflag_primary/mflag_secondary logic in ../configure.in unfortunately all need
36## to be kept in sync with each other
njn8b68b642009-06-24 00:37:09 +000037if VGCONF_OS_IS_LINUX
njn8b68b642009-06-24 00:37:09 +000038 MPI_FLAG_M3264_PRI = $(AM_FLAG_M3264_PRI)
39 MPI_FLAG_M3264_SEC = $(AM_FLAG_M3264_SEC)
40endif
njn8b68b642009-06-24 00:37:09 +000041if VGCONF_OS_IS_DARWIN
njn8b68b642009-06-24 00:37:09 +000042 MPI_FLAG_M3264_PRI = $(AM_FLAG_M3264_PRI)
43 MPI_FLAG_M3264_SEC = $(AM_FLAG_M3264_SEC)
44endif
45
46
47if BUILD_MPIWRAP_PRI
48libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES = libmpiwrap.c
49libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS = -I../include
50libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CFLAGS = \
51 $(CFLAGS_MPI) $(MPI_FLAG_M3264_PRI)
52libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS = $(LDFLAGS_MPI)
53endif
54if BUILD_MPIWRAP_SEC
55libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES = libmpiwrap.c
56libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS = -I../include
57libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CFLAGS = \
58 $(CFLAGS_MPI) $(MPI_FLAG_M3264_SEC)
59libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS = $(LDFLAGS_MPI)
60endif
61
62#----------------------------------------------------------------------------
63# General stuff
64#----------------------------------------------------------------------------
65
66all-local: inplace-noinst_PROGRAMS inplace-noinst_DSYMS
67
68clean-local: clean-noinst_DSYMS
69
70install-exec-local: install-noinst_PROGRAMS install-noinst_DSYMS
71