~ubuntu-branches/ubuntu/trusty/mm/trusty

« back to all changes in this revision

Viewing changes to Makefile.in

  • Committer: Bazaar Package Importer
  • Author(s): Mark Brown
  • Date: 2004-06-05 14:21:20 UTC
  • Revision ID: james.westby@ubuntu.com-20040605142120-qwj17z6kec5dadrr
Tags: upstream-1.3.0
ImportĀ upstreamĀ versionĀ 1.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
## ====================================================================
 
2
## Copyright (c) 1999-2003 Ralf S. Engelschall <rse@engelschall.com>
 
3
## Copyright (c) 1999-2003 The OSSP Project <http://www.ossp.org/>
 
4
##
 
5
## Redistribution and use in source and binary forms, with or without
 
6
## modification, are permitted provided that the following conditions
 
7
## are met:
 
8
##
 
9
## 1. Redistributions of source code must retain the above copyright
 
10
##    notice, this list of conditions and the following disclaimer.
 
11
##
 
12
## 2. Redistributions in binary form must reproduce the above copyright
 
13
##    notice, this list of conditions and the following disclaimer in
 
14
##    the documentation and/or other materials provided with the
 
15
##    distribution.
 
16
##
 
17
## 3. All advertising materials mentioning features or use of this
 
18
##    software must display the following acknowledgment:
 
19
##    "This product includes software developed by
 
20
##     Ralf S. Engelschall <rse@engelschall.com>."
 
21
##
 
22
## 4. Redistributions of any form whatsoever must retain the following
 
23
##    acknowledgment:
 
24
##    "This product includes software developed by
 
25
##     Ralf S. Engelschall <rse@engelschall.com>."
 
26
##
 
27
## THIS SOFTWARE IS PROVIDED BY RALF S. ENGELSCHALL ``AS IS'' AND ANY
 
28
## EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 
29
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 
30
## PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL RALF S. ENGELSCHALL OR
 
31
## ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 
32
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 
33
## NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 
34
## LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 
35
## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 
36
## STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 
37
## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 
38
## OF THE POSSIBILITY OF SUCH DAMAGE.
 
39
## ====================================================================
 
40
 
 
41
@SET_MAKE@
 
42
 
 
43
TOP         = .
 
44
 
 
45
DESTDIR     =
 
46
prefix      = @prefix@
 
47
exec_prefix = @exec_prefix@
 
48
bindir      = @bindir@
 
49
libdir      = @libdir@
 
50
includedir  = @includedir@
 
51
mandir      = @mandir@
 
52
 
 
53
SHELL       = /bin/sh
 
54
CC          = @CC@
 
55
CFLAGS      = @CFLAGS@
 
56
LDFLAGS     = @LDFLAGS@
 
57
LIBS        = @LIBS@
 
58
RM          = rm -f
 
59
LIBTOOL     = ./libtool
 
60
SHTOOL      = ./shtool
 
61
 
 
62
LIBS        = libmm.la
 
63
OBJS        = mm_global.lo mm_alloc.lo mm_core.lo mm_lib.lo mm_vers.lo
 
64
MANS        = mm.3 mm-config.1
 
65
TSTS        = mm_test
 
66
 
 
67
.SUFFIXES: .o .lo
 
68
 
 
69
.c.o:
 
70
        $(LIBTOOL) --quiet --mode=compile $(CC) -c $(CFLAGS) $<
 
71
.c.lo:
 
72
        $(LIBTOOL) --quiet --mode=compile $(CC) -c $(CFLAGS) $<
 
73
 
 
74
all: $(LIBS) $(MANS) $(TSTS)
 
75
 
 
76
libmm.la: $(OBJS)
 
77
        $(LIBTOOL) --quiet --mode=link $(CC) -o $@ $(OBJS) \
 
78
            -rpath $(libdir) -version-info `$(SHTOOL) version -l c -d libtool mm_vers.c`
 
79
 
 
80
mm_alloc.c mm_core.c mm_global.c: mm.h mm_vers.c
 
81
mm.h: config.h
 
82
 
 
83
mm_test: mm_test.lo libmm.la
 
84
        $(LIBTOOL) --quiet --mode=link $(CC) -o $@ mm_test.lo libmm.la
 
85
 
 
86
mm.3: mm.pod
 
87
        V1=`$(SHTOOL) version -l c -d short mm_vers.c`; \
 
88
        V2=`$(SHTOOL) version -l c -d long mm_vers.c`; \
 
89
        D=`$(SHTOOL) version -l c -d long mm_vers.c | sed -e 's;.*(;;' -e 's;).*;;'`; \
 
90
        pod2man --section=3 --center="Shared Memory Library" --release="$$D" --date="MM $$V1" mm.pod |\
 
91
        perl -p -e 's;^(\\\&\s+.+?)([Mm][Mm]_[a-zA-Z0-9_]+)(\(.+?)$$;$$1\\fB$$2\\fR$$3;' |\
 
92
        sed -e "s;MM_VERSION_STR;$$V2;" >mm.3
 
93
 
 
94
mm-config.1: mm-config.pod
 
95
        V1=`$(SHTOOL) version -l c -d short mm_vers.c`; \
 
96
        V2=`$(SHTOOL) version -l c -d long mm_vers.c`; \
 
97
        D=`$(SHTOOL) version -l c -d long mm_vers.c | sed -e 's;.*(;;' -e 's;).*;;'`; \
 
98
        pod2man --section=1 --center="Shared Memory Library" --release="$$D" --date="MM $$V1" mm-config.pod |\
 
99
        perl -p -e 's;^(\\\&\s+.+?)([Mm][Mm]_[a-zA-Z0-9_]+)(\(.+?)$$;$$1\\fB$$2\\fR$$3;' |\
 
100
        sed -e "s;MM_VERSION_STR;$$V2;" >mm-config.1
 
101
 
 
102
check: test
 
103
test: mm_test
 
104
        @$(LIBTOOL) --mode=execute ./mm_test
 
105
debug: mm_test
 
106
        @$(LIBTOOL) --mode=execute gdb ./mm_test
 
107
 
 
108
install: all
 
109
        $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir)
 
110
        $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(includedir)
 
111
        $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(libdir)
 
112
        $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1
 
113
        $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man3
 
114
        $(SHTOOL) install -c -m 755 mm-config $(DESTDIR)$(bindir)/mm-config
 
115
        $(SHTOOL) install -c -m 644 mm-config.1 $(DESTDIR)$(mandir)/man1/mm-config.1
 
116
        $(SHTOOL) install -c -m 644 mm.3 $(DESTDIR)$(mandir)/man3/mm.3
 
117
        $(SHTOOL) install -c -m 644 mm.h $(DESTDIR)$(includedir)/mm.h
 
118
        @$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 libmm.la $(DESTDIR)$(libdir)/libmm.la
 
119
 
 
120
clean:
 
121
        -$(RM) $(TSTS)
 
122
        -$(RM) $(OBJS)
 
123
        -$(RM) $(LIBS)
 
124
        -$(RM) core *.core *.bak *~
 
125
        -$(RM) -r .libs >/dev/null 2>&1 || true
 
126
        -$(RM) *.o *.lo
 
127
 
 
128
distclean: clean
 
129
        -$(RM) config.log config.status config.cache
 
130
        -$(RM) Makefile config.h cfg-config
 
131
        -$(RM) libtool
 
132
        -$(RM) mm-config
 
133
 
 
134
realclean: distclean
 
135
        -$(RM) $(MANS)
 
136
        -$(RM) configure config.h.in
 
137
        -$(RM) shtool
 
138
        -$(RM) ltmain.sh libtool.m4 config.guess config.sub
 
139