~bkerensa/ubuntu/raring/valgrind/merge-from-deb

« back to all changes in this revision

Viewing changes to auxprogs/Makefile.am

  • Committer: Bazaar Package Importer
  • Author(s): Andrés Roldán
  • Date: 2008-06-13 02:31:40 UTC
  • mto: (1.4.1 upstream) (2.2.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: james.westby@ubuntu.com-20080613023140-iwk33rz9rhvfkr96
Import upstream version 3.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
bin_PROGRAMS = valgrind-listener
5
5
 
6
 
noinst_SCRIPTS = gen-mdg DotToScc.hs primes.c \
 
6
noinst_SCRIPTS = gen-mdg DotToScc.hs Merge3Way.hs primes.c \
7
7
                gsl16test gsl16-badfree.patch gsl16-wavelet.patch \
8
 
                ppcfround.c ppc64shifts.c libmpiwrap.c mpiwrap_type_test.c
 
8
                gsl19test \
 
9
                ppcfround.c ppc64shifts.c libmpiwrap.c mpiwrap_type_test.c \
 
10
                aix5_VKI_info.c libmpiwrap_aix5.exp \
 
11
                aix5_proc_self_sysent.c \
 
12
                posixtestsuite-1.5.1-diff-results \
 
13
                posixtestsuite-1.5.1-diff.txt
9
14
 
10
15
EXTRA_DIST = $(noinst_SCRIPTS)
11
16
 
24
29
 
25
30
 
26
31
#------------------------- mpi wrappers -----------------------
27
 
# Build libmpiwrap.so for the primary target only.
 
32
# Build libmpiwrap.so for the primary target, and for the secondary
 
33
# target if relevant.
28
34
#
29
35
# This is really horrible.
30
36
#
31
 
# Don't let automake install this, since it puts it in the
32
 
# wrong place.  Instead install it ourselves in the right
 
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
33
39
# place using the install-exec-local target below.
34
40
#
35
41
# Also, automake isn't good at supporting non-$(CC) compilers.
36
42
# But we need to use $(MPI_CC) here.  Hence the nasty hack of
37
 
# directly saying how to build libmpiwrap.so, instead of
 
43
# directly saying how to build libmpiwrap-*.so, instead of
38
44
# using automake's standard gunk.
39
45
#
40
 
if BUILD_MPIWRAP
41
 
noinst_PROGRAMS       = libmpiwrap.so
42
 
#libmpiwrap_so_SOURCES = mpiwrap.c
43
 
#libmpiwrap_so_CFLAGS  = $(AM_FLAG_M3264_PRI) \
44
 
#                               -g -O -fPIC -fno-omit-frame-pointer \
45
 
#                               -I../include -I@MPI_PREFIX@/include
46
 
#libmpiwrap_so_LDFLAGS = $(AM_FLAG_M3264_PRI) -g -shared
47
 
#
48
 
# Note re leading '-'s: tells GNU make to keep going even if command fails
49
 
#
50
 
libmpiwrap.so: libmpiwrap.c
51
 
        -$(MPI_CC) -g -O -fno-omit-frame-pointer -Wall -fPIC -shared \
52
 
                -I../include \
53
 
                $(AM_FLAG_M3264_PRI) \
54
 
                -o libmpiwrap.so libmpiwrap.c
 
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) \
 
68
                -I../include \
 
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:
55
85
 
56
86
install-exec-local:
 
87
if BUILD_MPIWRAP_PRI
57
88
# convert (eg) X86_LINUX to x86-linux
58
89
# really should use sed here, rather than assume tr is available
59
90
        pD=`echo @VG_PLATFORM_PRI@ | tr A-Z_ a-z-` ; \
60
 
                $(mkinstalldirs) $(DESTDIR)$(valdir)/$$pD;
61
 
        -pD=`echo @VG_PLATFORM_PRI@ | tr A-Z_ a-z-` ; \
62
 
                $(INSTALL_PROGRAM) ./libmpiwrap.so $(DESTDIR)$(valdir)/$$pD
63
 
endif
 
91
                $(mkinstalldirs) $(DESTDIR)$(valdir)/$$pD; \
 
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
 
97
endif
 
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
 
 
109
## And some hacks to keep 'make dist' happy.
 
110
## It would seem that using nodist_SOURCES is the right fix, but
 
111
## I can't figure out how to do it.
 
112
##
 
113
#nodist_SOURCES        = libmpiwrap-@VG_PLATFORM_PRI@.c
 
114
#nodist_SOURCES        = libmpiwrap-@VG_PLATFORM_SEC@.c
 
115
 
 
116
libmpiwrap-.c:
 
117
        rm -f libmpiwrap-.c
 
118
        touch libmpiwrap-.c
 
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
 
125
libmpiwrap-@VG_PLATFORM_SEC@.c:
 
126
        rm -f libmpiwrap-@VG_PLATFORM_SEC@.c
 
127
        touch libmpiwrap-@VG_PLATFORM_SEC@.c
 
128
endif
 
129
 
 
130
## cleanery
 
131
clean-local:
 
132
        rm -f libmpiwrap-.c \
 
133
        libmpiwrap-@VG_PLATFORM_PRI@.c libmpiwrap-@VG_PLATFORM_SEC@.c
 
134
 
64
135
#
65
136
#----------------------------------------------------------
66
137