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 = \ 15 libmpiwrap_aix5.exp \ 16 mpiwrap_type_test.c 17 18 #---------------------------------------------------------------------------- 19 # libmpiwrap-<platform>.so 20 #---------------------------------------------------------------------------- 21 22 noinst_PROGRAMS = 23 if BUILD_MPIWRAP_PRI 24 noinst_PROGRAMS += libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so 25 endif 26 if BUILD_MPIWRAP_SEC 27 noinst_PROGRAMS += libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so 28 endif 29 30 if VGCONF_OS_IS_DARWIN 31 noinst_DSYMS = $(noinst_PROGRAMS) 32 endif 33 34 35 if 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) 40 endif 41 if 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` 49 endif 50 if 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) 55 endif 56 57 58 if BUILD_MPIWRAP_PRI 59 libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES = libmpiwrap.c 60 libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS = -I../include 61 libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CFLAGS = \ 62 $(CFLAGS_MPI) $(MPI_FLAG_M3264_PRI) 63 libmpiwrap_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS = $(LDFLAGS_MPI) 64 endif 65 if BUILD_MPIWRAP_SEC 66 libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES = libmpiwrap.c 67 libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS = -I../include 68 libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CFLAGS = \ 69 $(CFLAGS_MPI) $(MPI_FLAG_M3264_SEC) 70 libmpiwrap_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS = $(LDFLAGS_MPI) 71 endif 72 73 #---------------------------------------------------------------------------- 74 # General stuff 75 #---------------------------------------------------------------------------- 76 77 all-local: inplace-noinst_PROGRAMS inplace-noinst_DSYMS 78 79 clean-local: clean-noinst_DSYMS 80 81 install-exec-local: install-noinst_PROGRAMS install-noinst_DSYMS 82 83