njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 1 | include $(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. |
| 7 | CC = $(MPI_CC) |
| 8 | DEFS = |
| 9 | DEFAULT_INCLUDES = |
| 10 | CPPFLAGS = |
| 11 | CFLAGS = |
| 12 | LDFLAGS = |
| 13 | |
| 14 | EXTRA_DIST = \ |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 15 | mpiwrap_type_test.c |
| 16 | |
| 17 | #---------------------------------------------------------------------------- |
| 18 | # libmpiwrap-<platform>.so |
| 19 | #---------------------------------------------------------------------------- |
| 20 | |
| 21 | noinst_PROGRAMS = |
| 22 | if BUILD_MPIWRAP_PRI |
| 23 | noinst_PROGRAMS += libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so |
| 24 | endif |
| 25 | if BUILD_MPIWRAP_SEC |
| 26 | noinst_PROGRAMS += libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so |
| 27 | endif |
| 28 | |
| 29 | if VGCONF_OS_IS_DARWIN |
| 30 | noinst_DSYMS = $(noinst_PROGRAMS) |
| 31 | endif |
| 32 | |
| 33 | |
philippe | f7c5433 | 2012-05-17 15:32:54 +0000 | [diff] [blame] | 34 | ## 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 |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 37 | if VGCONF_OS_IS_LINUX |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 38 | MPI_FLAG_M3264_PRI = $(AM_FLAG_M3264_PRI) |
| 39 | MPI_FLAG_M3264_SEC = $(AM_FLAG_M3264_SEC) |
| 40 | endif |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 41 | if VGCONF_OS_IS_DARWIN |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 42 | MPI_FLAG_M3264_PRI = $(AM_FLAG_M3264_PRI) |
| 43 | MPI_FLAG_M3264_SEC = $(AM_FLAG_M3264_SEC) |
| 44 | endif |
| 45 | |
| 46 | |
| 47 | if BUILD_MPIWRAP_PRI |
| 48 | libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES = libmpiwrap.c |
sewardj | 1dd8258 | 2013-10-14 11:47:11 +0000 | [diff] [blame] | 49 | libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS = -I$(top_srcdir)/include |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 50 | libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CFLAGS = \ |
| 51 | $(CFLAGS_MPI) $(MPI_FLAG_M3264_PRI) |
| 52 | libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS = $(LDFLAGS_MPI) |
| 53 | endif |
| 54 | if BUILD_MPIWRAP_SEC |
| 55 | libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES = libmpiwrap.c |
sewardj | 1dd8258 | 2013-10-14 11:47:11 +0000 | [diff] [blame] | 56 | libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS = -I$(top_srcdir)/include |
njn | 8b68b64 | 2009-06-24 00:37:09 +0000 | [diff] [blame] | 57 | libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CFLAGS = \ |
| 58 | $(CFLAGS_MPI) $(MPI_FLAG_M3264_SEC) |
| 59 | libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS = $(LDFLAGS_MPI) |
| 60 | endif |
| 61 | |
| 62 | #---------------------------------------------------------------------------- |
| 63 | # General stuff |
| 64 | #---------------------------------------------------------------------------- |
| 65 | |
| 66 | all-local: inplace-noinst_PROGRAMS inplace-noinst_DSYMS |
| 67 | |
| 68 | clean-local: clean-noinst_DSYMS |
| 69 | |
| 70 | install-exec-local: install-noinst_PROGRAMS install-noinst_DSYMS |
| 71 | |