nethercote | 4388a40 | 2004-09-01 23:20:49 +0000 | [diff] [blame] | 1 | include $(top_srcdir)/Makefile.all.am |
njn | e68d7c0 | 2005-09-27 20:27:04 +0000 | [diff] [blame] | 2 | include $(top_srcdir)/Makefile.core.am |
njn | 7a6e746 | 2002-11-09 17:53:30 +0000 | [diff] [blame] | 3 | |
njn | 7a6e746 | 2002-11-09 17:53:30 +0000 | [diff] [blame] | 4 | bin_PROGRAMS = valgrind-listener |
| 5 | |
sewardj | 8cbd68c | 2006-10-17 21:04:15 +0000 | [diff] [blame] | 6 | noinst_SCRIPTS = gen-mdg DotToScc.hs Merge3Way.hs primes.c \ |
sewardj | be13445 | 2006-02-06 04:19:30 +0000 | [diff] [blame] | 7 | gsl16test gsl16-badfree.patch gsl16-wavelet.patch \ |
sewardj | a368961 | 2007-03-26 15:27:01 +0000 | [diff] [blame] | 8 | gsl19test \ |
sewardj | 452fba8 | 2006-07-06 01:54:34 +0000 | [diff] [blame] | 9 | ppcfround.c ppc64shifts.c libmpiwrap.c mpiwrap_type_test.c \ |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 10 | aix5_VKI_info.c libmpiwrap_aix5.exp \ |
| 11 | aix5_proc_self_sysent.c \ |
sewardj | 452fba8 | 2006-07-06 01:54:34 +0000 | [diff] [blame] | 12 | posixtestsuite-1.5.1-diff-results \ |
| 13 | posixtestsuite-1.5.1-diff.txt |
njn | 47167fd | 2005-06-26 14:43:01 +0000 | [diff] [blame] | 14 | |
njn | 94260f2 | 2005-07-02 17:36:11 +0000 | [diff] [blame] | 15 | EXTRA_DIST = $(noinst_SCRIPTS) |
| 16 | |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 17 | |
| 18 | #------------------------- listener ----------------------- |
| 19 | # Build valgrind_listener for the primary target only. |
| 20 | # |
nethercote | 4388a40 | 2004-09-01 23:20:49 +0000 | [diff] [blame] | 21 | valgrind_listener_SOURCES = valgrind-listener.c |
njn | 7a6e746 | 2002-11-09 17:53:30 +0000 | [diff] [blame] | 22 | |
sewardj | 0126214 | 2006-01-04 01:20:28 +0000 | [diff] [blame] | 23 | valgrind_listener_CPPFLAGS = $(AM_CPPFLAGS_PRI) |
| 24 | valgrind_listener_CFLAGS = $(AM_CFLAGS_PRI) |
| 25 | valgrind_listener_CCASFLAGS = $(AM_CCASFLAGS_PRI) |
| 26 | valgrind_listener_LDFLAGS = $(AM_CFLAGS_PRI) |
| 27 | # |
| 28 | #---------------------------------------------------------- |
| 29 | |
| 30 | |
sewardj | 8063775 | 2006-03-02 13:48:21 +0000 | [diff] [blame] | 31 | #------------------------- mpi wrappers ----------------------- |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 32 | # Build libmpiwrap.so for the primary target, and for the secondary |
| 33 | # target if relevant. |
sewardj | 0ad4609 | 2006-03-02 17:09:16 +0000 | [diff] [blame] | 34 | # |
| 35 | # This is really horrible. |
| 36 | # |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 37 | # Don't let automake install this, since it puts the .so's in the |
| 38 | # wrong place. Instead install them ourselves in the right |
sewardj | 8063775 | 2006-03-02 13:48:21 +0000 | [diff] [blame] | 39 | # place using the install-exec-local target below. |
| 40 | # |
sewardj | 0ad4609 | 2006-03-02 17:09:16 +0000 | [diff] [blame] | 41 | # Also, automake isn't good at supporting non-$(CC) compilers. |
| 42 | # But we need to use $(MPI_CC) here. Hence the nasty hack of |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 43 | # directly saying how to build libmpiwrap-*.so, instead of |
sewardj | 0ad4609 | 2006-03-02 17:09:16 +0000 | [diff] [blame] | 44 | # using automake's standard gunk. |
| 45 | # |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 46 | if VGO_AIX5 |
| 47 | HACKY_FLAGS_PRI = -g -O -bE:libmpiwrap_aix5.exp -bM:SRE -bnoentry \ |
| 48 | -qflag=w:w \ |
| 49 | `echo $(AM_FLAG_M3264_PRI) | sed s/maix/q/g` |
| 50 | HACKY_FLAGS_SEC = -g -O -bE:libmpiwrap_aix5.exp -bM:SRE -bnoentry \ |
| 51 | -qflag=w:w \ |
| 52 | `echo $(AM_FLAG_M3264_SEC) | sed s/maix/q/g` |
| 53 | else |
| 54 | HACKY_FLAGS_PRI = -g -O -fno-omit-frame-pointer -Wall -fpic -shared \ |
| 55 | $(AM_FLAG_M3264_PRI) |
| 56 | HACKY_FLAGS_SEC = -g -O -fno-omit-frame-pointer -Wall -fpic -shared \ |
| 57 | $(AM_FLAG_M3264_SEC) |
| 58 | endif |
| 59 | |
| 60 | |
| 61 | ## First, we have to say how to build the .so's .. |
| 62 | ## |
| 63 | noinst_PROGRAMS = |
| 64 | if BUILD_MPIWRAP_PRI |
| 65 | noinst_PROGRAMS += libmpiwrap-@VG_PLATFORM_PRI@.so |
| 66 | libmpiwrap-@VG_PLATFORM_PRI@.so: libmpiwrap.c |
| 67 | $(MPI_CC) $(HACKY_FLAGS_PRI) \ |
sewardj | 1a85e60 | 2006-03-08 15:26:10 +0000 | [diff] [blame] | 68 | -I../include \ |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 69 | -o libmpiwrap-@VG_PLATFORM_PRI@.so libmpiwrap.c |
| 70 | endif |
| 71 | if BUILD_MPIWRAP_SEC |
| 72 | noinst_PROGRAMS += libmpiwrap-@VG_PLATFORM_SEC@.so |
| 73 | libmpiwrap-@VG_PLATFORM_SEC@.so: libmpiwrap.c |
| 74 | $(MPI_CC) $(HACKY_FLAGS_SEC) \ |
| 75 | -I../include \ |
| 76 | -o libmpiwrap-@VG_PLATFORM_SEC@.so libmpiwrap.c |
| 77 | endif |
| 78 | |
| 79 | |
| 80 | ## And here we say how to install them. |
| 81 | ## |
| 82 | # The following install hack is serialised by "libmpiwrap.so". |
| 83 | # Hence force -j 1. |
| 84 | .NOTPARALLEL: |
sewardj | 8063775 | 2006-03-02 13:48:21 +0000 | [diff] [blame] | 85 | |
| 86 | install-exec-local: |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 87 | if BUILD_MPIWRAP_PRI |
sewardj | 8063775 | 2006-03-02 13:48:21 +0000 | [diff] [blame] | 88 | # convert (eg) X86_LINUX to x86-linux |
| 89 | # really should use sed here, rather than assume tr is available |
| 90 | pD=`echo @VG_PLATFORM_PRI@ | tr A-Z_ a-z-` ; \ |
sewardj | c669125 | 2006-12-10 02:26:50 +0000 | [diff] [blame] | 91 | $(mkinstalldirs) $(DESTDIR)$(valdir)/$$pD; \ |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 92 | rm -f ./libmpiwrap.so; \ |
| 93 | cp ./libmpiwrap-@VG_PLATFORM_PRI@.so ./libmpiwrap.so; \ |
| 94 | $(INSTALL_PROGRAM) ./libmpiwrap.so \ |
| 95 | $(DESTDIR)$(valdir)/$$pD; \ |
| 96 | rm -f ./libmpiwrap.so |
sewardj | 8063775 | 2006-03-02 13:48:21 +0000 | [diff] [blame] | 97 | endif |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 98 | if BUILD_MPIWRAP_SEC |
| 99 | pD=`echo @VG_PLATFORM_SEC@ | tr A-Z_ a-z-` ; \ |
| 100 | $(mkinstalldirs) $(DESTDIR)$(valdir)/$$pD; \ |
| 101 | rm -f ./libmpiwrap.so; \ |
| 102 | cp ./libmpiwrap-@VG_PLATFORM_SEC@.so ./libmpiwrap.so; \ |
| 103 | $(INSTALL_PROGRAM) ./libmpiwrap.so \ |
| 104 | $(DESTDIR)$(valdir)/$$pD; \ |
| 105 | rm -f ./libmpiwrap.so |
| 106 | endif |
| 107 | |
| 108 | |
sewardj | 775a368 | 2007-03-08 01:52:37 +0000 | [diff] [blame] | 109 | ## And some hacks to keep 'make dist' happy. |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 110 | ## It would seem that using nodist_SOURCES is the right fix, but |
| 111 | ## I can't figure out how to do it. |
| 112 | ## |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 113 | #nodist_SOURCES = libmpiwrap-@VG_PLATFORM_PRI@.c |
sewardj | 775a368 | 2007-03-08 01:52:37 +0000 | [diff] [blame] | 114 | #nodist_SOURCES = libmpiwrap-@VG_PLATFORM_SEC@.c |
| 115 | |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 116 | libmpiwrap-.c: |
| 117 | rm -f libmpiwrap-.c |
| 118 | touch libmpiwrap-.c |
sewardj | 775a368 | 2007-03-08 01:52:37 +0000 | [diff] [blame] | 119 | |
| 120 | libmpiwrap-@VG_PLATFORM_PRI@.c: |
| 121 | rm -f libmpiwrap-@VG_PLATFORM_PRI@.c |
| 122 | touch libmpiwrap-@VG_PLATFORM_PRI@.c |
| 123 | |
| 124 | if VGP_HAVE_SECONDARY |
sewardj | 1eff82b | 2006-10-17 00:56:43 +0000 | [diff] [blame] | 125 | libmpiwrap-@VG_PLATFORM_SEC@.c: |
| 126 | rm -f libmpiwrap-@VG_PLATFORM_SEC@.c |
| 127 | touch libmpiwrap-@VG_PLATFORM_SEC@.c |
| 128 | endif |
| 129 | |
sewardj | 775a368 | 2007-03-08 01:52:37 +0000 | [diff] [blame] | 130 | ## cleanery |
| 131 | clean-local: |
| 132 | rm -f libmpiwrap-.c \ |
| 133 | libmpiwrap-@VG_PLATFORM_PRI@.c libmpiwrap-@VG_PLATFORM_SEC@.c |
| 134 | |
sewardj | 8063775 | 2006-03-02 13:48:21 +0000 | [diff] [blame] | 135 | # |
| 136 | #---------------------------------------------------------- |
| 137 | |