1include $(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 = \ 15 libmpiwrap_aix5.exp \ 16 mpiwrap_type_test.c 17 18#---------------------------------------------------------------------------- 19# libmpiwrap-<platform>.so 20#---------------------------------------------------------------------------- 21 22noinst_PROGRAMS = 23if BUILD_MPIWRAP_PRI 24noinst_PROGRAMS += libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so 25endif 26if BUILD_MPIWRAP_SEC 27noinst_PROGRAMS += libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so 28endif 29 30if VGCONF_OS_IS_DARWIN 31noinst_DSYMS = $(noinst_PROGRAMS) 32endif 33 34 35if VGCONF_OS_IS_LINUX 36 CFLAGS_MPI = -g -O -fno-omit-frame-pointer -Wall -fpic 37 LDFLAGS_MPI = -fpic -shared 38 MPI_FLAG_M3264_PRI = $(AM_FLAG_M3264_PRI) 39 MPI_FLAG_M3264_SEC = $(AM_FLAG_M3264_SEC) 40endif 41if VGCONF_OS_IS_AIX5 42 # MPICC on AIX is called XLC. It uses weird options. 43 CFLAGS_MPI = -g -O -qflag=w:w -qlanglvl=extended 44 LDFLAGS_MPI = -bE:libmpiwrap_aix5.exp -bM:SRE -bnoentry \ 45 -qflag=w:w -qlanglvl=extended 46 # The sed bit changes eg. "maix32" to "q32" which is the XLC option. 47 MPI_FLAG_M3264_PRI = `echo $(AM_FLAG_M3264_PRI) | sed s/maix/q/g` 48 MPI_FLAG_M3264_SEC = `echo $(AM_FLAG_M3264_SEC) | sed s/maix/q/g` 49endif 50if VGCONF_OS_IS_DARWIN 51 CFLAGS_MPI = -g -O -fno-omit-frame-pointer -Wall -dynamic 52 LDFLAGS_MPI = -dynamic -dynamiclib -all_load 53 MPI_FLAG_M3264_PRI = $(AM_FLAG_M3264_PRI) 54 MPI_FLAG_M3264_SEC = $(AM_FLAG_M3264_SEC) 55endif 56 57 58if BUILD_MPIWRAP_PRI 59libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES = libmpiwrap.c 60libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS = -I../include 61libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CFLAGS = \ 62 $(CFLAGS_MPI) $(MPI_FLAG_M3264_PRI) 63libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS = $(LDFLAGS_MPI) 64endif 65if BUILD_MPIWRAP_SEC 66libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES = libmpiwrap.c 67libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS = -I../include 68libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CFLAGS = \ 69 $(CFLAGS_MPI) $(MPI_FLAG_M3264_SEC) 70libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS = $(LDFLAGS_MPI) 71endif 72 73#---------------------------------------------------------------------------- 74# General stuff 75#---------------------------------------------------------------------------- 76 77all-local: inplace-noinst_PROGRAMS inplace-noinst_DSYMS 78 79clean-local: clean-noinst_DSYMS 80 81install-exec-local: install-noinst_PROGRAMS install-noinst_DSYMS 82 83