summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Arnold <nerdboy@gentoo.org>2009-08-01 20:00:23 +0000
committerSteve Arnold <nerdboy@gentoo.org>2009-08-01 20:00:23 +0000
commit3a31d177ea5e77ba5e96c3ac2b4d7c360f027466 (patch)
treeda9e38a9885affe492fa13445e2b89ab97a21ec1 /dev-util/duma
parentddrescue bump (diff)
downloadhistorical-3a31d177ea5e77ba5e96c3ac2b4d7c360f027466.tar.gz
historical-3a31d177ea5e77ba5e96c3ac2b4d7c360f027466.tar.bz2
historical-3a31d177ea5e77ba5e96c3ac2b4d7c360f027466.zip
Updated to latest version using new ebuild (closes bug #275011).
Package-Manager: portage-2.2_rc33/cvs/Linux x86_64
Diffstat (limited to 'dev-util/duma')
-rw-r--r--dev-util/duma/ChangeLog9
-rw-r--r--dev-util/duma/Manifest5
-rw-r--r--dev-util/duma/duma-2.5.15.ebuild90
-rw-r--r--dev-util/duma/files/duma-2.5.15-GNUmakefile.patch1159
4 files changed, 1261 insertions, 2 deletions
diff --git a/dev-util/duma/ChangeLog b/dev-util/duma/ChangeLog
index 38a5cc8b4f3e..3af946259f05 100644
--- a/dev-util/duma/ChangeLog
+++ b/dev-util/duma/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-util/duma
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/duma/ChangeLog,v 1.9 2009/04/01 00:47:27 nerdboy Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/duma/ChangeLog,v 1.10 2009/08/01 20:00:23 nerdboy Exp $
+
+*duma-2.5.15 (01 Aug 2009)
+
+ 01 Aug 2009; Steve Arnold <nerdboy@gentoo.org> +duma-2.5.15.ebuild,
+ +files/duma-2.5.15-GNUmakefile.patch:
+ Updated to latest version using ebuild and patch contributed by
+ ssuominen with one or two minor enhancements. Closes bug #275011.
*duma-2.5.14-r1 (01 Apr 2009)
diff --git a/dev-util/duma/Manifest b/dev-util/duma/Manifest
index 87f75ca7d908..2aa77d86ef45 100644
--- a/dev-util/duma/Manifest
+++ b/dev-util/duma/Manifest
@@ -1,13 +1,16 @@
AUX duma-2.4.27-make.patch 1706 RMD160 0a0e0c30871fddca18ed714c4138d43a1cd57224 SHA1 78c81579035c7503a21c00b00369f94f28e6211a SHA256 3f04db181872f181aa3449cf5783285a2bf3efcc3d01ec8f21789a8d3769b81c
AUX duma-2.4.27-types.patch 1118 RMD160 7495dd75ff286e1c5e18151c88928c49dab4e5e7 SHA1 3dd9923e284c061c5daf04389969429306ca56b8 SHA256 8dee22387d1d64bcb965caa15f931707f10b79bc6b229fb71a4afb6897dca89c
+AUX duma-2.5.15-GNUmakefile.patch 33639 RMD160 9d59cb091bc65ae4dbc4538ff487377103940f3e SHA1 053e5db48d6d2356e771605032c157a6b9364376 SHA256 2c7bbd9dc912feb3b390a30309ddb1250427a4c00c267f90d37d115b03f3527d
AUX duma-2.5.8-soname.patch 479 RMD160 05d9aea99fa01fd5144cdd7d88ec3e876814d138 SHA1 0bd36c7a4d76acc34ceb05aedb244745b555d8d5 SHA256 0c7be0ecc6bfe1c3625a03619e77d447d015a5b1e1d7831f0d9793c1707ed9ad
DIST duma_2_4_27.tar.gz 89150 RMD160 97031490edb832d325243ed09b0132393faa730d SHA1 1d0521b01188e9ee05c40124ee2382d40da9b6c4 SHA256 4993373c7f0241e8e247e510335157c22b113a9cb449fd7d346d6f494c6211d8
DIST duma_2_5_13.tar.gz 233157 RMD160 4e6ab25727e49582a9d9d59087e624a2b9e1e260 SHA1 873740941b8c8a00421bb04f2d0321f858408ee6 SHA256 338757d68f580b38d0680f21151c55e705abf5c933d959410be90fe5c5248777
DIST duma_2_5_14.tar.gz 237777 RMD160 9e1c77ce3801a124044293215b0d7ee6692281a1 SHA1 c99bd748e58608e3614ac3a3b1511eded7b9465a SHA256 91d9cc49e7aae7da342b1422521ba08b82685b666630bc64a7a97eab47520258
+DIST duma_2_5_15.tar.gz 240479 RMD160 c2d6399fb2701892b2a9113e4cb47b75d2d87f52 SHA1 f1f90620c5eff4e76316594fa3e7e5a6833b8d0d SHA256 baaf794854e3093ad1bddadbfb8ad4b220a7117d70359ee216bd59e353734e17
DIST duma_2_5_8.tar.gz 219961 RMD160 37a1cefa853b15ea5ec9da92a8deeca500ca34b9 SHA1 f2b071b9ea5264829a009901f744f24f2e571807 SHA256 43a96d92384c22c191fbc6f935d0ed4ae378a561776dc7fcdf64763728c65770
EBUILD duma-2.4.27.ebuild 2012 RMD160 e9f3200d98841a4839c1bb88731df19de1fb930d SHA1 d758a4f180049df7472f762de76ae448b554bd1a SHA256 eb020d980bd2aff66546787396d141909d67857e4c567056c4fc6be20eaebbed
EBUILD duma-2.5.13.ebuild 2185 RMD160 99b0ccca4fd2c57dd33f2e1c83a33c2e9d402a8b SHA1 9b53f3ea8c985d20d31659c02d55d674f4f7ea11 SHA256 1c2c5faa96669e7376bb985c866e7d5bdc44e9986f1dca8563b0eeb17716629e
EBUILD duma-2.5.14-r1.ebuild 2290 RMD160 850174808c9d6b5dd8714c95b332db25f5fe2b3a SHA1 ea249dd9e8ca135fb3e2ab5325e3ed34c324b279 SHA256 67916d45509d3a5e4b551e8daa9effd7abef1a93fe15cf183b5f4bded073c5ed
+EBUILD duma-2.5.15.ebuild 2402 RMD160 26d08003ee954ee2c49884811513955dd1257298 SHA1 6c878848a34072d33c4885bcf580163f105951e3 SHA256 ee3382104c6bb805f91970f475ecfb2b2136bb3eaee74e8601beaa4cc4544764
EBUILD duma-2.5.8.ebuild 2160 RMD160 030ab4203fba122f6d304c8488597404fbc6743f SHA1 9873deeb683c637e48a858cf1e0af60e5084b955 SHA256 27d4e623b599e37891c3186bfb2604315456f2832f1350b8f16c658a96d597d5
-MISC ChangeLog 2039 RMD160 9c7f3ba40e62cb39853b8c3f01786ae5ea726dd8 SHA1 a3253cbb8d3d70f9df0621fe6db7c5b04bd0128e SHA256 5333762257eb04fd56235f3133f04ef730f4a3b933984ca317d0cf4073414cca
+MISC ChangeLog 2315 RMD160 ebaedf3f410871f3385a16f329cc1c584bf03eeb SHA1 e9478970ba2eef5687aafc37bdfd531aea9b4eb0 SHA256 ea00cb90c70fc42c2356e71887746c24bf2d21605939b6e559746a1bd1757c8c
MISC metadata.xml 571 RMD160 7503a42ba65123b48155aa20812e1f76165843af SHA1 57e85da85b7fcd90018216e371fed033cac76ee7 SHA256 5a422de5cb204ec5f8cc4631fb5c54721f27e929e290e9fa494bcd15351cf107
diff --git a/dev-util/duma/duma-2.5.15.ebuild b/dev-util/duma/duma-2.5.15.ebuild
new file mode 100644
index 000000000000..074a40c31983
--- /dev/null
+++ b/dev-util/duma/duma-2.5.15.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/duma/duma-2.5.15.ebuild,v 1.1 2009/08/01 20:00:23 nerdboy Exp $
+
+EAPI=2
+inherit eutils flag-o-matic multilib toolchain-funcs versionator
+
+MY_P=${PN}_$(replace_all_version_separators '_')
+
+DESCRIPTION="DUMA (Detect Unintended Memory Access) is a memory debugging library"
+HOMEPAGE="http://duma.sourceforge.net"
+SRC_URI="mirror://sourceforge/duma/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="examples"
+
+RDEPEND="app-shells/bash"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-GNUmakefile.patch
+}
+
+src_compile() {
+ # strip-flags
+ replace-flags O? O0
+ append-flags -Wall -Wextra -U_FORTIFY_SOURCE
+ tc-export AR CC CXX LD RANLIB
+
+ case "${CHOST}" in
+ *-linux-gnu)
+ OS=linux;;
+ *-solaris*)
+ OS=solaris;;
+ *-darwin*)
+ OS=osx;;
+ *-freebsd*)
+ OS=freebsd;;
+ *-netbsd*)
+ OS=netbsd;;
+ *-cygwin*)
+ OS=cygwin;;
+ **-irix**)
+ OS=irix;;
+ esac
+ export OS="${OS}"
+ elog "Detected OS is: ${OS}"
+
+ if use amd64 && ! [ -n "${DUMA_ALIGNMENT}" ]; then
+ export DUMA_ALIGNMENT=16
+ elog "Exported DUMA_ALIGNMENT=${DUMA_ALIGNMENT} for x86_64,"
+ fi
+
+ make reconfig || die "make config failed"
+ # The above must be run first if distcc is enabled, otherwise
+ # the real build breaks on parallel makes.
+ emake || die "emake failed"
+}
+
+src_test() {
+ emake test || die "emake test failed"
+
+ elog "Please, see the output above to verify all tests have passed."
+ elog "Both static and dynamic confidence tests should say PASSED."
+}
+
+src_install(){
+ emake prefix="${D}/usr" libdir="${D}/usr/$(get_libdir)" \
+ docdir="${D}/usr/share/doc/${PF}" install || die "emake install failed"
+
+ dodoc CHANGELOG TODO GNUmakefile
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins example[1-6].cpp example_makes/ex6/Makefile || die "doins failed"
+ fi
+}
+
+pkg_postinst() {
+ elog "See the GNUmakefile which will be also installed at"
+ elog "/usr/share/doc/${PF} for more options. You can now export"
+ elog "varibles to the build system easily, e.g.:"
+ elog "# export CPPFLAGS=\"-DFLAG\" (or by using append-cppflags)"
+ elog "# export DUMA_ALIGNMENT=${DUMA_ALIGNMENT} (Default is 16 for x86_64)"
+ elog "See more information about DUMA_ALIGNMENT from Readme.txt"
+}
diff --git a/dev-util/duma/files/duma-2.5.15-GNUmakefile.patch b/dev-util/duma/files/duma-2.5.15-GNUmakefile.patch
new file mode 100644
index 000000000000..59c2570ea586
--- /dev/null
+++ b/dev-util/duma/files/duma-2.5.15-GNUmakefile.patch
@@ -0,0 +1,1159 @@
+Rename CPPFLAGS to CXXFLAGS and DUMA_OPTIONS to CPPFLAGS as that's intended for the preprocessor AFAIK. Respect users AR, LD, CC, CXX, CXXFLAGS, CFLAGS, LDFLAGSand RANLIB. Fix building with GLIBC 2.10+ by working around the souce fortifying.
+
+diff -ur duma_2_5_15.orig/comparisons/ex11/Makefile duma_2_5_15/comparisons/ex11/Makefile
+--- duma_2_5_15.orig/comparisons/ex11/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/comparisons/ex11/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CFLAGS=-g -O0 -I$(DUMADIR) -include stdlib.h -include duma.h
++CFLAGS +=-I$(DUMADIR) -include stdlib.h -include duma.h
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=wrong1
+ OBJ=$(BIN).o
+@@ -21,8 +21,8 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CC) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+ .c.o:
+- $(CC) $(CFLAGS) -c $< -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+diff -ur duma_2_5_15.orig/comparisons/ex12/Makefile duma_2_5_15/comparisons/ex12/Makefile
+--- duma_2_5_15.orig/comparisons/ex12/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/comparisons/ex12/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CFLAGS=-g -O0 -I$(DUMADIR) -include stdlib.h -include duma.h
++CFLAGS +=-I$(DUMADIR) -include stdlib.h -include duma.h
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=wrong3
+ OBJ=$(BIN).o
+@@ -21,8 +21,8 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CC) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+ .c.o:
+- $(CC) $(CFLAGS) -c $< -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+diff -ur duma_2_5_15.orig/comparisons/ex13/Makefile duma_2_5_15/comparisons/ex13/Makefile
+--- duma_2_5_15.orig/comparisons/ex13/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/comparisons/ex13/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CFLAGS=-g -O0 -I$(DUMADIR) -include stdlib.h -include duma.h
++CFLAGS +=-I$(DUMADIR) -include stdlib.h -include duma.h
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=wrong6
+ OBJ=$(BIN).o
+@@ -21,8 +21,8 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CC) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+ .c.o:
+- $(CC) $(CFLAGS) -c $< -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+diff -ur duma_2_5_15.orig/comparisons/ex14/Makefile duma_2_5_15/comparisons/ex14/Makefile
+--- duma_2_5_15.orig/comparisons/ex14/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/comparisons/ex14/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CFLAGS=-g -O0 -I$(DUMADIR) -include stdlib.h -include duma.h
++CFLAGS +=-I$(DUMADIR) -include stdlib.h -include duma.h
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=wrong7
+ OBJ=$(BIN).o
+@@ -21,8 +21,8 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CC) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+ .c.o:
+- $(CC) $(CFLAGS) -c $< -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+diff -ur duma_2_5_15.orig/comparisons/ex15/Makefile duma_2_5_15/comparisons/ex15/Makefile
+--- duma_2_5_15.orig/comparisons/ex15/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/comparisons/ex15/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CFLAGS=-g -O0 -I$(DUMADIR) -include stdlib.h -include duma.h
++CFLAGS +=-I$(DUMADIR) -include stdlib.h -include duma.h
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=leak1
+ OBJ=$(BIN).o
+@@ -21,8 +21,8 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CC) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+ .c.o:
+- $(CC) $(CFLAGS) -c $< -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+diff -ur duma_2_5_15.orig/comparisons/ex16/Makefile duma_2_5_15/comparisons/ex16/Makefile
+--- duma_2_5_15.orig/comparisons/ex16/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/comparisons/ex16/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CFLAGS=-g -O0 -I$(DUMADIR) -include stdlib.h -include duma.h
++CFLAGS +=-I$(DUMADIR) -include stdlib.h -include duma.h
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=leak2
+ OBJ=$(BIN).o
+@@ -21,8 +21,8 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CC) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+ .c.o:
+- $(CC) $(CFLAGS) -c $< -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+diff -ur duma_2_5_15.orig/comparisons/ex17/Makefile duma_2_5_15/comparisons/ex17/Makefile
+--- duma_2_5_15.orig/comparisons/ex17/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/comparisons/ex17/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CFLAGS=-g -O0 -I$(DUMADIR) -include stdlib.h -include duma.h
++CFLAGS +=-I$(DUMADIR) -include stdlib.h -include duma.h
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=ok5
+ OBJ=$(BIN).o
+@@ -21,8 +21,8 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CC) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+ .c.o:
+- $(CC) $(CFLAGS) -c $< -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+diff -ur duma_2_5_15.orig/comparisons/ex21/Makefile duma_2_5_15/comparisons/ex21/Makefile
+--- duma_2_5_15.orig/comparisons/ex21/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/comparisons/ex21/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CPPFLAGS=-g -O0 -I$(DUMADIR) -include stdlib.h -include new -include dumapp.h
++CXXFLAGS += -I$(DUMADIR) -include stdlib.h -include new -include dumapp.h
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=wrong1
+ OBJ=$(BIN).o
+@@ -21,7 +21,7 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CXX) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+ .cc.o:
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) -c $< -o $@
+diff -ur duma_2_5_15.orig/comparisons/ex22/Makefile duma_2_5_15/comparisons/ex22/Makefile
+--- duma_2_5_15.orig/comparisons/ex22/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/comparisons/ex22/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CPPFLAGS=-g -O0 -I$(DUMADIR) -include stdlib.h -include new -include dumapp.h
++CXXFLAGS += -I$(DUMADIR) -include stdlib.h -include new -include dumapp.h
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=wrong2
+ OBJ=$(BIN).o
+@@ -21,7 +21,7 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CXX) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+ .cc.o:
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) -c $< -o $@
+diff -ur duma_2_5_15.orig/comparisons/ex23/Makefile duma_2_5_15/comparisons/ex23/Makefile
+--- duma_2_5_15.orig/comparisons/ex23/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/comparisons/ex23/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CPPFLAGS=-g -O0 -I$(DUMADIR) -include stdlib.h -include new -include dumapp.h
++CXXFLAGS += -I$(DUMADIR) -include stdlib.h -include new -include dumapp.h
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=wrong3
+ OBJ=$(BIN).o
+@@ -21,7 +21,7 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CXX) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+ .cc.o:
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) -c $< -o $@
+diff -ur duma_2_5_15.orig/comparisons/ex24/Makefile duma_2_5_15/comparisons/ex24/Makefile
+--- duma_2_5_15.orig/comparisons/ex24/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/comparisons/ex24/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CPPFLAGS=-g -O0 -I$(DUMADIR) -include stdlib.h -include new -include dumapp.h
++CXXFLAGS += -I$(DUMADIR) -include stdlib.h -include new -include dumapp.h
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=wrong4
+ OBJ=$(BIN).o
+@@ -21,7 +21,7 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CXX) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+ .cc.o:
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) -c $< -o $@
+diff -ur duma_2_5_15.orig/comparisons/ex25/Makefile duma_2_5_15/comparisons/ex25/Makefile
+--- duma_2_5_15.orig/comparisons/ex25/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/comparisons/ex25/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CPPFLAGS=-g -O0 -I$(DUMADIR) -include stdlib.h -include new -include dumapp.h
++CXXFLAGS += -I$(DUMADIR) -include stdlib.h -include new -include dumapp.h
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=wrong5
+ OBJ=$(BIN).o
+@@ -21,7 +21,7 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CXX) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+ .cc.o:
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) -c $< -o $@
+diff -ur duma_2_5_15.orig/comparisons/ex26/Makefile duma_2_5_15/comparisons/ex26/Makefile
+--- duma_2_5_15.orig/comparisons/ex26/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/comparisons/ex26/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CPPFLAGS=-g -O0 -I$(DUMADIR) -include stdlib.h -include new -include dumapp.h
++CXXFLAGS += -I$(DUMADIR) -include stdlib.h -include new -include dumapp.h
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=wrong6
+ OBJ=$(BIN).o
+@@ -21,7 +21,7 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CXX) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+ .cc.o:
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) -c $< -o $@
+diff -ur duma_2_5_15.orig/comparisons/ex27/Makefile duma_2_5_15/comparisons/ex27/Makefile
+--- duma_2_5_15.orig/comparisons/ex27/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/comparisons/ex27/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CPPFLAGS=-g -O0 -I$(DUMADIR) -include stdlib.h -include new -include dumapp.h
++CXXFLAGS += -I$(DUMADIR) -include stdlib.h -include new -include dumapp.h
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=leak1
+ OBJ=$(BIN).o
+@@ -21,7 +21,7 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CXX) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+ .cc.o:
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) -c $< -o $@
+diff -ur duma_2_5_15.orig/comparisons/ex28/Makefile duma_2_5_15/comparisons/ex28/Makefile
+--- duma_2_5_15.orig/comparisons/ex28/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/comparisons/ex28/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CPPFLAGS=-g -O0 -I$(DUMADIR) -include stdlib.h -include new -include dumapp.h
++CXXFLAGS += -I$(DUMADIR) -include stdlib.h -include new -include dumapp.h
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=leak2
+ OBJ=$(BIN).o
+@@ -21,7 +21,7 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CXX) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+ .cc.o:
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) -c $< -o $@
+diff -ur duma_2_5_15.orig/comparisons/ex29/Makefile duma_2_5_15/comparisons/ex29/Makefile
+--- duma_2_5_15.orig/comparisons/ex29/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/comparisons/ex29/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CPPFLAGS=-g -O0 -I$(DUMADIR) -include stdlib.h -include new -include dumapp.h
++CXXFLAGS += -I$(DUMADIR) -include stdlib.h -include new -include dumapp.h
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=ok5
+ OBJ=$(BIN).o
+@@ -21,7 +21,7 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CXX) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+ .cc.o:
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) -c $< -o $@
+diff -ur duma_2_5_15.orig/example_makes/ex1/Makefile duma_2_5_15/example_makes/ex1/Makefile
+--- duma_2_5_15.orig/example_makes/ex1/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/example_makes/ex1/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CPPFLAGS=-g -O0 -I$(DUMADIR)
++CXXFLAGS += -I$(DUMADIR)
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=example1
+ OBJ=../../$(BIN).o
+@@ -21,5 +21,5 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CXX) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+diff -ur duma_2_5_15.orig/example_makes/ex2/Makefile duma_2_5_15/example_makes/ex2/Makefile
+--- duma_2_5_15.orig/example_makes/ex2/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/example_makes/ex2/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CPPFLAGS=-g -O0 -I$(DUMADIR)
++CXXFLAGS += -I$(DUMADIR)
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=example2
+ OBJ=../../$(BIN).o
+@@ -21,5 +21,5 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CXX) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+diff -ur duma_2_5_15.orig/example_makes/ex3/Makefile duma_2_5_15/example_makes/ex3/Makefile
+--- duma_2_5_15.orig/example_makes/ex3/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/example_makes/ex3/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CPPFLAGS=-g -O0 -I$(DUMADIR)
++CXXFLAGS += -I$(DUMADIR)
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=example3
+ OBJ=../../$(BIN).o
+@@ -21,5 +21,5 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CXX) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+diff -ur duma_2_5_15.orig/example_makes/ex4/Makefile duma_2_5_15/example_makes/ex4/Makefile
+--- duma_2_5_15.orig/example_makes/ex4/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/example_makes/ex4/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CPPFLAGS=-g -O0 -I$(DUMADIR)
++CXXFLAGS += -I$(DUMADIR)
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=example4
+ OBJ=../../$(BIN).o
+@@ -21,5 +21,5 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CXX) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+diff -ur duma_2_5_15.orig/example_makes/ex5/Makefile duma_2_5_15/example_makes/ex5/Makefile
+--- duma_2_5_15.orig/example_makes/ex5/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/example_makes/ex5/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CPPFLAGS=-g -O0 -I$(DUMADIR)
++CXXFLAGS += -I$(DUMADIR)
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=example5
+ OBJ=../../$(BIN).o
+@@ -21,5 +21,5 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CXX) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+diff -ur duma_2_5_15.orig/example_makes/ex6/Makefile duma_2_5_15/example_makes/ex6/Makefile
+--- duma_2_5_15.orig/example_makes/ex6/Makefile 2009-06-22 05:27:53.000000000 +0300
++++ duma_2_5_15/example_makes/ex6/Makefile 2009-06-22 05:35:37.000000000 +0300
+@@ -1,6 +1,6 @@
+
+ DUMADIR=../..
+-CPPFLAGS=-g -O0 -I$(DUMADIR) -include stdlib.h -include new -include dumapp.h
++CXXFLAGS += -I$(DUMADIR) -include stdlib.h -include new -include dumapp.h
+ LFLAGS=$(DUMADIR)/libduma.a
+ ifeq ($(OS), Windows_NT)
+ LIBS=
+@@ -8,8 +8,8 @@
+ LIBS=-lpthread
+ endif
+
+-CC=gcc
+-CXX=g++
++CC ?= gcc
++CXX ?= g++
+
+ BIN=example6
+ OBJ=../../$(BIN).o
+@@ -21,7 +21,7 @@
+ - rm -f $(OBJ) $(BIN)
+
+ $(BIN): $(OBJ)
+- $(CXX) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) $(OBJ) $(LFLAGS) $(LIBS) -o $(BIN)
+
+ .cpp.o:
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) -c $< -o $@
+diff -ur duma_2_5_15.orig/GNUmakefile duma_2_5_15/GNUmakefile
+--- duma_2_5_15.orig/GNUmakefile 2008-08-03 22:22:38.000000000 +0300
++++ duma_2_5_15/GNUmakefile 2009-06-22 05:57:24.000000000 +0300
+@@ -65,38 +65,35 @@
+ #
+ ########################################
+
+-# edit following line
+-DUMA_OPTIONS=
+-
+ # no leak detection on any platform:
+ # use static library for finding leaks - with information memory was allocated
+ # i think leak-checking without further information is quite useless!
+ # additionaly too many platforms/environments are broken.
+-DUMA_OPTIONS += -DDUMA_SO_NO_LEAKDETECTION
++CPPFLAGS += -DDUMA_SO_NO_LEAKDETECTION $(DUMA_OPTIONS)
+
+ # some test cases:
+-#DUMA_OPTIONS += -DDUMA_LIB_NO_LEAKDETECTION
+-#DUMA_OPTIONS += -DDUMA_NO_THREAD_SAFETY
+-#DUMA_OPTIONS += -DDUMA_NO_CPP_SUPPORT
++#CPPFLAGS += -DDUMA_LIB_NO_LEAKDETECTION
++#CPPFLAGS += -DDUMA_NO_THREAD_SAFETY
++#CPPFLAGS += -DDUMA_NO_CPP_SUPPORT
+
+-PIC=-fPIC -DPIC
+-DUMA_SO_OPTIONS=$(PIC) -DDUMA_SO_LIBRARY
++# For shared linking,
++LFLAGS = -fPIC -DPIC -DDUMA_SO_LIBRARY
+
+ # for FreeBSD 5.4
+-# DUMA_OPTIONS += -DPAGE_PROTECTION_VIOLATED_SIGNAL=SIGBUS
++# CPPFLAGS += -DPAGE_PROTECTION_VIOLATED_SIGNAL=SIGBUS
+ #
+ # for FreeBSD 5.4 if DUMA_EXPLICIT_INIT is not set
+-# DUMA_OPTIONS += -DDUMA_NO_LEAKDETECTION
++# CPPFLAGS += -DDUMA_NO_LEAKDETECTION
+ #
+ # for cygwin environment on Windows
+-# DUMA_OPTIONS += -DDUMA_EXPLICIT_INIT
++# CPPFLAGS += -DDUMA_EXPLICIT_INIT
+ # also define 'WIN32'
+
+ # some defaults:
+-CC=gcc
+-CXX=g++
+-AR=ar
+-RANLIB=ranlib
++CC?=gcc
++CXX?=g++
++AR?=ar
++RANLIB?=ranlib
+ INSTALL=install
+ RM=rm
+ RMFORCE=rm -f
+@@ -116,7 +113,7 @@
+ # using explicit initialization to avoid leak report
+ # from __w32_sharedptr_initialize() function
+ BSWITCH=101
+- DUMA_OPTIONS += -DDUMA_EXPLICIT_INIT
++ CPPFLAGS += -DDUMA_EXPLICIT_INIT
+ RM=del
+ RMFORCE=del /F 2>nul
+ ECHO=echo
+@@ -124,31 +121,25 @@
+ CURPATH=
+ DUMA_DYN_DEPS=
+ DUMASO=
+- CFLAGS=-g -O0
+- CPPFLAGS=-g -O0
+ LIBS=
+ EXEPOSTFIX=.exe
+ endif
+ ifeq ($(OSTYPE), cygwin)
+ # call make OSTYPE=cygwin
+ BSWITCH=102
+- DUMA_OPTIONS += -DDUMA_EXPLICIT_INIT
++ CPPFLAGS += -DWIN32 -DDUMA_EXPLICIT_INIT
+ CURPATH=./
+ DUMA_DYN_DEPS=
+ DUMASO=
+- CFLAGS=-g -O0 -DWIN32 -Wall -Wextra
+- CPPFLAGS=-g -O0 -DWIN32 -Wall -Wextra
+ LIBS=
+ EXEPOSTFIX=.exe
+ endif
+ ifndef BSWITCH
+ BSWITCH=100
+- DUMA_OPTIONS += -DDUMA_EXPLICIT_INIT
++ CPPFLAGS += -DWIN32 -DDUMA_EXPLICIT_INIT
+ CURPATH=./
+ DUMA_DYN_DEPS=
+ DUMASO=
+- CFLAGS=-g -O0 -DWIN32
+- CPPFLAGS=-g -O0 -DWIN32
+ LIBS=
+ EXEPOSTFIX=.exe
+ endif
+@@ -158,29 +149,23 @@
+ # tested on darwin 8.0, which is the base for mac-osx
+ # call: make OS=osx
+ BSWITCH=210
+- DUMA_OPTIONS += -DPAGE_PROTECTION_VIOLATED_SIGNAL=SIGBUS
+- DUMA_OPTIONS += -DDUMA_SO_PREFER_GETENV
+-# DUMA_OPTIONS += -DDUMA_LIB_NO_LEAKDETECTION
++ CPPFLAGS += -DPAGE_PROTECTION_VIOLATED_SIGNAL=SIGBUS -DDUMA_SO_PREFER_GETENV
++# CPPFLAGS += -DDUMA_LIB_NO_LEAKDETECTION
+ CURPATH=./
+ # DUMA_DYN_DEPS=
+ DUMASO=libduma.dylib
+ DUMASO_LINK1=libduma.dylib
+- CFLAGS=-g -O0
+- CPPFLAGS=-g -O0
+ LIBS=-lpthread
+ EXEPOSTFIX=
+ endif
+
+ ifeq ($(OS), freebsd)
+ BSWITCH=310
+- DUMA_OPTIONS += -DDUMA_NO_THREAD_SAFETY
+- DUMA_OPTIONS += -DDUMA_EXPLICIT_INIT
++ CPPFLAGS += -DDUMA_NO_THREAD_SAFETY -DDUMA_EXPLICIT_INIT
+ CURPATH=./
+ DUMA_DYN_DEPS=
+ DUMASO=
+ DUMASO_LINK1=
+- CFLAGS=-g -O0
+- CPPFLAGS=-g -O0
+ LIBS=-lpthread
+ EXEPOSTFIX=
+ endif
+@@ -191,25 +176,19 @@
+ DUMASO=libduma.so.0.0.0
+ DUMASO_LINK1=libduma.so.0
+ DUMASO_LINK2=libduma.so
+- CFLAGS=-g -O0
+- CPPFLAGS=-g -O0
+ LIBS=-lpthread
+ EXEPOSTFIX=
+ endif
+
+ ifeq ($(OS), solaris)
+ BSWITCH=410
+- DUMA_OPTIONS += -DDUMA_NO_STRERROR
++ CPPFLAGS += -DDUMA_NO_STRERROR
+ CURPATH=./
+ DUMA_DYN_DEPS=
+ DUMASO=libduma.so.0.0.0
+ DUMASO_LINK1=libduma.so.0
+ DUMASO_LINK2=libduma.so
+- CFLAGS=-g -O0
+- CPPFLAGS=-g -O0
+- LDFLAGS += -lgcc_s
+- LDOPTIONS += -lgcc_s
+- LIBS=-Wl,-R/opt/sfw/lib -lpthread
++ LIBS=-lgcc_s -Wl,-R/opt/sfw/lib -lpthread
+ EXEPOSTFIX=
+ endif
+
+@@ -220,8 +199,6 @@
+ DUMASO=libduma.so.0.0.0
+ DUMASO_LINK1=libduma.so.0
+ DUMASO_LINK2=libduma.so
+- CFLAGS=-g -O0 -Wall -Wextra
+- CPPFLAGS=-g -O0 -Wall -Wextra
+ LIBS=-lpthread
+ EXEPOSTFIX=
+ endif
+@@ -234,8 +211,6 @@
+ DUMASO=libduma.so.0.0.0
+ DUMASO_LINK1=libduma.so.0
+ DUMASO_LINK2=libduma.so
+- CFLAGS=-g -O0 -Wall -Wextra
+- CPPFLAGS=-g -O0 -Wall -Wextra
+ LIBS=-lpthread
+ EXEPOSTFIX=
+ endif
+@@ -243,9 +218,6 @@
+
+ ############################################################
+
+-MAN_INSTALL_DIR=$(prefix)/share/man/man3
+-DOC_INSTALL_DIR=$(prefix)/share/doc/duma
+-
+ ifndef srcdir
+ srcdir=.
+ $(info using default srcdir [$(srcdir)])
+@@ -271,6 +243,10 @@
+ datadir=$(prefix)/share
+ endif
+
++ifndef mandir
++ mandir=$(datadir)/man
++endif
++
+ # The directory for installing read-only data files that pertain to a single machine--that is to say, files for configuring a host.
+ ifndef sysconfdir
+ sysconfdir=$(prefix)/etc
+@@ -286,6 +262,9 @@
+ includedir=$(prefix)/include
+ endif
+
++ifndef docdir
++ docdir=$(datadir)/doc/duma
++endif
+
+ PACKAGE_SOURCE=README.txt CHANGELOG COPYING-GPL COPYING-LGPL duma.3 Makefile gdbinit.rc \
+ duma.h dumapp.h duma_sem.h paging.h print.h duma_hlp.h noduma.h \
+@@ -344,6 +323,8 @@
+ @echo exec_prefix [$(exec_prefix)]
+ @echo bindir [$(bindir)]
+ @echo datadir [$(datadir)]
++ @echo mandir [$(mandir)]
++ @echo docdir [$(docdir)]
+ @echo sysconfdir [$(sysconfdir)]
+ @echo libdir [$(libdir)]
+ @echo includedir [$(includedir)]
+@@ -352,12 +333,11 @@
+ else
+ @echo oldincludedir empty
+ endif
+- @echo MAN_INSTALL_DIR [$(MAN_INSTALL_DIR)]
+- @echo DOC_INSTALL_DIR [$(DOC_INSTALL_DIR)]
+ @echo MAKE [$(MAKE)]
+ @echo CC [$(CC)]
+ @echo CFLAGS [$(CFLAGS)]
+ @echo CXX [$(CXX)]
++ @echo CXXFLAGS [$(CXXFLAGS)]
+ @echo CPPFLAGS [$(CPPFLAGS)]
+ @echo LD [$(LD)]
+ @echo AR [$(AR)]
+@@ -368,11 +348,9 @@
+ @echo RMFORCE [$(RMFORCE)]
+ @echo ECHO [$(ECHO)]
+ @echo ECHOLF [$(ECHOLF)]
+- @echo PIC [$(PIC)]
++ @echo LFLAGS [$(LFLAGS)]
+ @echo EXEPOSTFIX [$(EXEPOSTFIX)]
+ @echo CURPATH [$(CURPATH)]
+- @echo DUMA_OPTIONS [$(DUMA_OPTIONS)]
+- @echo DUMA_SO_OPTIONS [$(DUMA_SO_OPTIONS)]
+ @echo OBJECTS [$(OBJECTS)]
+ @echo SO_OBJECTS [$(SO_OBJECTS)]
+ @echo DUMASO [$(DUMASO)]
+@@ -386,8 +364,8 @@
+ # commands; copy any auxiliary files that the executable uses into the
+ # directories where it will look for them.
+ install: libduma.a duma.3 $(DUMASO)
+- - mkdir -p $(DOC_INSTALL_DIR)
+- $(INSTALL) -m 644 README.txt $(DOC_INSTALL_DIR)
++ - mkdir -p $(docdir)
++ $(INSTALL) -m 644 README.txt $(docdir)
+ - mkdir -p $(includedir)
+ $(INSTALL) -m 644 noduma.h duma.h dumapp.h duma_sem.h duma_config.h $(includedir)
+ - mkdir -p $(bindir)
+@@ -405,13 +383,13 @@
+ - $(RMFORCE) $(libdir)/$(DUMASO_LINK2)
+ ln -s $(DUMASO) $(libdir)/$(DUMASO_LINK2)
+ endif
+- - mkdir -p $(MAN_INSTALL_DIR)
+- $(INSTALL) -m 644 duma.3 $(MAN_INSTALL_DIR)/duma.3
++ - mkdir -p $(mandir)/man3
++ $(INSTALL) -m 644 duma.3 $(mandir)/man3/duma.3
+
+
+ # Delete all the installed files that the `install' target would create
+ uninstall:
+- - $(RMFORCE) $(DOC_INSTALL_DIR)/README.txt
++ - $(RMFORCE) $(docdir)/README.txt
+ - $(RMFORCE) $(includedir)/noduma.h
+ - $(RMFORCE) $(includedir)/duma.h
+ - $(RMFORCE) $(includedir)/dumapp.h
+@@ -428,7 +406,7 @@
+ ifdef DUMASO_LINK2
+ - $(RMFORCE) $(libdir)/$(DUMASO_LINK2)
+ endif
+- - $(RMFORCE) $(MAN_INSTALL_DIR)/duma.3
++ - $(RMFORCE) $(mandir)/man3/duma.3
+
+
+ # Delete all files that are normally created by running make.
+@@ -471,39 +449,39 @@
+
+ createconf$(EXEPOSTFIX): createconf.o
+ - $(RMFORCE) createconf$(EXEPOSTFIX)
+- $(CC) $(CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) createconf.o -o createconf$(EXEPOSTFIX)
+
+ tstheap$(EXEPOSTFIX): libduma.a tstheap.o
+ - $(RMFORCE) tstheap$(EXEPOSTFIX)
+- $(CC) $(CFLAGS) tstheap.o libduma.a -o tstheap$(EXEPOSTFIX) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) tstheap.o libduma.a -o tstheap$(EXEPOSTFIX) $(LIBS)
+
+ dumatest$(EXEPOSTFIX): libduma.a dumatest.o
+ - $(RMFORCE) dumatest$(EXEPOSTFIX)
+- $(CC) $(CFLAGS) dumatest.o libduma.a -o dumatest$(EXEPOSTFIX) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) dumatest.o libduma.a -o dumatest$(EXEPOSTFIX) $(LIBS)
+
+ dumatestpp$(EXEPOSTFIX): libduma.a dumatestpp.o duma_sem.h dumapp.h
+ - $(RMFORCE) dumatestpp$(EXEPOSTFIX)
+- $(CXX) $(CPPFLAGS) dumatestpp.o libduma.a -o dumatestpp$(EXEPOSTFIX) $(LIBS)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) dumatestpp.o libduma.a -o dumatestpp$(EXEPOSTFIX) $(LIBS)
+
+ thread-test$(EXEPOSTFIX): libduma.a thread-test.o
+ - $(RMFORCE) thread-test$(EXEPOSTFIX)
+- $(CC) $(CFLAGS) thread-test.o libduma.a -o thread-test$(EXEPOSTFIX) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) thread-test.o libduma.a -o thread-test$(EXEPOSTFIX) $(LIBS)
+
+ testmt$(EXEPOSTFIX): libduma.a testmt.o
+ - $(RMFORCE) testmt$(EXEPOSTFIX)
+- $(CC) $(CFLAGS) testmt.o libduma.a -o testmt$(EXEPOSTFIX) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) testmt.o libduma.a -o testmt$(EXEPOSTFIX) $(LIBS)
+
+ testoperators$(EXEPOSTFIX): libduma.a testoperators.o duma_sem.h dumapp.h
+ - $(RMFORCE) testoperators$(EXEPOSTFIX)
+- $(CXX) $(CPPFLAGS) testoperators.o libduma.a -o testoperators$(EXEPOSTFIX) $(LIBS)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) testoperators.o libduma.a -o testoperators$(EXEPOSTFIX) $(LIBS)
+
+ tstheap_so$(EXEPOSTFIX): tstheap_so.o
+ - $(RMFORCE) tstheap_so$(EXEPOSTFIX)
+- $(CC) $(CFLAGS) tstheap_so.o -o tstheap_so$(EXEPOSTFIX) $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) tstheap_so.o -o tstheap_so$(EXEPOSTFIX) $(LIBS)
+
+ dumatestpp_so$(EXEPOSTFIX): dumatestpp_so.o
+ - $(RMFORCE) dumatestpp_so$(EXEPOSTFIX)
+- $(CXX) $(CPPFLAGS) dumatestpp_so.o -o dumatestpp_so$(EXEPOSTFIX) $(LIBS)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) dumatestpp_so.o -o dumatestpp_so$(EXEPOSTFIX) $(LIBS)
+
+
+ $(OBJECTS) tstheap.o dumatest.o thread-test.o testmt.o dumatestpp.o: duma.h
+@@ -514,14 +492,14 @@
+ ifeq ($(OS), osx)
+
+ $(DUMASO): duma_config.h $(SO_OBJECTS)
+- $(CXX) -g -dynamiclib -Wl -o $(DUMASO) $(SO_OBJECTS) -lpthread -lc
+- $(CXX) -g -dynamiclib -o $(DUMASO) $(SO_OBJECTS) -lpthread -lc
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) -dynamiclib -Wl -o $(DUMASO) $(SO_OBJECTS) -lpthread -lc
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) -dynamiclib -o $(DUMASO) $(SO_OBJECTS) -lpthread -lc
+
+ else
+
+ $(DUMASO): duma_config.h $(SO_OBJECTS)
+- $(CXX) -g -shared -Wl,-soname,$(DUMASO) -o $(DUMASO) $(SO_OBJECTS) -lpthread -lc
+-# $(CXX) -g -shared -o $(DUMASO) $(SO_OBJECTS) -lpthread -lc
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) -shared -Wl,-soname,$(DUMASO) -o $(DUMASO) $(SO_OBJECTS) -lpthread -lc
++# $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) -shared -o $(DUMASO) $(SO_OBJECTS) -lpthread -lc
+
+ endif
+
+@@ -532,7 +510,7 @@
+ # define rules how to build objects for createconf
+ #
+ createconf.o:
+- $(CC) $(CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -c createconf.c -o $@
+
+
+ #
+@@ -540,39 +518,39 @@
+ #
+
+ dumapp_so.o: dumapp.cpp duma.h duma_sem.h dumapp.h
+- $(CXX) $(CPPFLAGS) $(DUMA_SO_OPTIONS) -c dumapp.cpp -o $@
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(LFLAGS) -c dumapp.cpp -o $@
+
+ duma_so.o: duma.c duma.h duma_config.h
+- $(CC) $(CFLAGS) $(DUMA_SO_OPTIONS) -c duma.c -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $(LFLAGS) -c duma.c -o $@
+
+ sem_inc_so.o: sem_inc.c duma_sem.h
+- $(CC) $(CFLAGS) $(DUMA_SO_OPTIONS) -c sem_inc.c -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $(LFLAGS) -c sem_inc.c -o $@
+
+ print_so.o: print.c print.h
+- $(CC) $(CFLAGS) $(DUMA_SO_OPTIONS) -c print.c -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $(LFLAGS) -c print.c -o $@
+
+-# DUMA_SO_OPTIONS needed cause duma.h is included explicitly
++# LFLAGS needed cause duma.h is included explicitly
+ tstheap_so.o:
+- $(CC) $(CFLAGS) $(DUMA_SO_OPTIONS) -c tstheap.c -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $(LFLAGS) -c tstheap.c -o $@
+
+ dumatestpp_so.o:
+- $(CXX) $(CPPFLAGS) $(DUMA_SO_OPTIONS) -c dumatestpp.cpp -o $@
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(LFLAGS) -c dumatestpp.cpp -o $@
+
+ #
+ # define rules how to build objects for static library
+ #
+
+ dumapp.o: dumapp.cpp duma.h duma_sem.h dumapp.h
+- $(CXX) $(CPPFLAGS) -c dumapp.cpp -o $@
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c dumapp.cpp -o $@
+
+ duma.o: duma.c duma.h duma_config.h
+- $(CC) $(CFLAGS) -c duma.c -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -c duma.c -o $@
+
+ sem_inc.o: sem_inc.c duma_sem.h
+- $(CC) $(CFLAGS) -c sem_inc.c -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -c sem_inc.c -o $@
+
+ print.o: print.c print.h
+- $(CC) $(CFLAGS) -c print.c -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -c print.c -o $@
+
+
+ #
+@@ -580,32 +558,32 @@
+ #
+
+ dumatest.o: dumatest.c duma.h duma_config.h
+- $(CC) $(CFLAGS) -c dumatest.c -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -c dumatest.c -o $@
+
+ dumatestpp.o: dumatestpp.cpp duma.h duma_sem.h dumapp.h duma_config.h
+- $(CXX) $(CPPFLAGS) -c dumatestpp.cpp -o $@
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c dumatestpp.cpp -o $@
+
+ tstheap.o: tstheap.c duma.h duma_config.h
+- $(CC) $(CFLAGS) -c tstheap.c -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -c tstheap.c -o $@
+
+ testoperators.o: testoperators.cpp duma.h duma_sem.h dumapp.h duma_config.h
+- $(CXX) $(CPPFLAGS) -c testoperators.cpp -o $@
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c testoperators.cpp -o $@
+
+ thread-test.o: thread-test.c duma.h duma_config.h
+- $(CC) $(CFLAGS) -c thread-test.c -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -c thread-test.c -o $@
+
+ testmt.o: testmt.c duma.h duma_config.h
+- $(CC) $(CFLAGS) -c testmt.c -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -c testmt.c -o $@
+
+
+ #
+ # default rules
+ #
+ #.c.o:
+-# $(CC) $(CFLAGS) -c $< -o $@
++# $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+ #
+ #.cpp.o:
+-# $(CXX) $(CPPFLAGS) -c $< -o $@
++# $(CXX) $(LDFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
+ #
+
+ .PHONY: check test installcheck install uninstall clean distclean realclean clobber dos2unix printvars
+diff -ur duma_2_5_15.orig/README.txt duma_2_5_15/README.txt
+--- duma_2_5_15.orig/README.txt 2009-04-07 01:26:47.000000000 +0300
++++ duma_2_5_15/README.txt 2009-06-22 05:53:14.000000000 +0300
+@@ -377,7 +377,7 @@
+ linenumber of the calling function. The atexit() function checks if each
+ allocated memory block was freed. To disable leak detection add the
+ preprocessor definition 'DUMA_SO_NO_LEAKDETECTION' or
+-'DUMA_LIB_NO_LEAKDETECTION' to DUMA_OPTIONS in Makefile.
++'DUMA_LIB_NO_LEAKDETECTION' to CPPFLAGS in Makefile.
+ If a leak is reported without source filename and line number but is
+ reproducible with the same pointer, set a conditional breakpoint on the
+ function 'void * duma_alloc_return( void * address)'
+@@ -392,7 +392,7 @@
+ same leak detection reports as for malloc and free. 'dumapp.h' needs to be
+ included from your source file(s).
+ For disabling the C++ new/delete/new[] and delete[] operators, add the
+-preprocessor definition 'DUMA_NO_CPP_SUPPORT' to DUMA_OPTIONS in Makefile.
++preprocessor definition 'DUMA_NO_CPP_SUPPORT' to CPPFLAGS in Makefile.
+
+
+ DEFINITION OF OWN MEMBER NEW/DELETE OPERATORS: