1
## ====================================================================
2
## Copyright (c) 1999-2003 Ralf S. Engelschall <rse@engelschall.com>
3
## Copyright (c) 1999-2003 The OSSP Project <http://www.ossp.org/>
5
## Redistribution and use in source and binary forms, with or without
6
## modification, are permitted provided that the following conditions
9
## 1. Redistributions of source code must retain the above copyright
10
## notice, this list of conditions and the following disclaimer.
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
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>."
22
## 4. Redistributions of any form whatsoever must retain the following
24
## "This product includes software developed by
25
## Ralf S. Engelschall <rse@engelschall.com>."
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
## ====================================================================
47
exec_prefix = @exec_prefix@
50
includedir = @includedir@
63
OBJS = mm_global.lo mm_alloc.lo mm_core.lo mm_lib.lo mm_vers.lo
64
MANS = mm.3 mm-config.1
70
$(LIBTOOL) --quiet --mode=compile $(CC) -c $(CFLAGS) $<
72
$(LIBTOOL) --quiet --mode=compile $(CC) -c $(CFLAGS) $<
74
all: $(LIBS) $(MANS) $(TSTS)
77
$(LIBTOOL) --quiet --mode=link $(CC) -o $@ $(OBJS) \
78
-rpath $(libdir) -version-info `$(SHTOOL) version -l c -d libtool mm_vers.c`
80
mm_alloc.c mm_core.c mm_global.c: mm.h mm_vers.c
83
mm_test: mm_test.lo libmm.la
84
$(LIBTOOL) --quiet --mode=link $(CC) -o $@ mm_test.lo libmm.la
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
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
104
@$(LIBTOOL) --mode=execute ./mm_test
106
@$(LIBTOOL) --mode=execute gdb ./mm_test
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
124
-$(RM) core *.core *.bak *~
125
-$(RM) -r .libs >/dev/null 2>&1 || true
129
-$(RM) config.log config.status config.cache
130
-$(RM) Makefile config.h cfg-config
136
-$(RM) configure config.h.in
138
-$(RM) ltmain.sh libtool.m4 config.guess config.sub