From 68bb313ac77e34d3b03fb66337227b705bcdc57d Mon Sep 17 00:00:00 2001 From: Kirill Ponomarev Date: Thu, 5 Feb 2004 19:11:40 +0000 Subject: - New options WITH_DEBUG and WITH_OPTIMIZED - Utilize OPTIONS PR: ports/62395 Submitted by: maintainer --- devel/ptypes/Makefile | 20 ++++++++++++++++++-- devel/ptypes/files/patch-src-Makefile.common | 6 +++--- devel/ptypes/files/patch-wshare-Makefile.common | 4 ++-- 3 files changed, 23 insertions(+), 7 deletions(-) (limited to 'devel/ptypes') diff --git a/devel/ptypes/Makefile b/devel/ptypes/Makefile index 14a83aedb793..43f90b1084ee 100644 --- a/devel/ptypes/Makefile +++ b/devel/ptypes/Makefile @@ -16,9 +16,25 @@ MAINTAINER= sem@ciam.ru COMMENT= C++ Portable Types Library SHLIB_VER= 19 + INSTALLS_SHLIB= yes -MAKE_ARGS+= PTHREAD_LIBS=${PTHREAD_LIBS} PTHREAD_CFLAGS=${PTHREAD_CFLAGS} PLIST_SUB+= SHLIB_VER=${SHLIB_VER} +PTYPES_CFLAGS= ${CFLAGS} + +OPTIONS= DEBUG "Build debug version" off \ + OPTIMIZED "Enable -O2 optimization" on + +.include + +.if defined(WITH_DEBUG) +DEBUG_FLAGS= -DDEBUG +.endif +.if defined(WITH_OPTIMIZED) +PTYPES_CFLAGS+= -O2 +.endif + +MAKE_ARGS+= PTHREAD_LIBS=${PTHREAD_LIBS} PTHREAD_CFLAGS=${PTHREAD_CFLAGS} \ + DEBUG_FLAGS=${DEBUG_FLAGS} PTYPES_CFLAGS="${PTYPES_CFLAGS}" do-install: ${MKDIR} ${PREFIX}/include/ptypes @@ -38,4 +54,4 @@ do-install: cd ${WRKSRC}/doc; ${TAR} cf - *| ${TAR} xf - -C ${DOCSDIR}/doc .endif -.include +.include diff --git a/devel/ptypes/files/patch-src-Makefile.common b/devel/ptypes/files/patch-src-Makefile.common index 9e4e42efc6a7..753b54984e7f 100644 --- a/devel/ptypes/files/patch-src-Makefile.common +++ b/devel/ptypes/files/patch-src-Makefile.common @@ -5,14 +5,14 @@ RANLIB = ranlib -DDEBUG = -DDEBUG -+DDEBUG = ++DDEBUG = $(DEBUG_FLAGS) INCDIR = ../include -CXXOPTS = $(OS_CXXOPTS) $(DDEBUG) -I$(INCDIR) -fPIC -Wall -O2 -+CXXOPTS = $(OS_CXXOPTS) $(DDEBUG) -I$(INCDIR) -fPIC -Wall $(CFLAGS) ++CXXOPTS = $(OS_CXXOPTS) $(DDEBUG) -I$(INCDIR) -fPIC -Wall $(PTYPES_CFLAGS) LDLIBS = $(OS_LDLIBS) -CXXOPTS_ST = -DPTYPES_ST $(OS_CXXOPTS_ST) $(DDEBUG) -I$(INCDIR) -Wall -O2 -+CXXOPTS_ST = -DPTYPES_ST $(OS_CXXOPTS_ST) $(DDEBUG) -I$(INCDIR) -Wall $(CFLAGS) ++CXXOPTS_ST = -DPTYPES_ST $(OS_CXXOPTS_ST) $(DDEBUG) -I$(INCDIR) -Wall $(PTYPES_CFLAGS) LDLIBS_ST = $(OS_LDLIBS_ST) LIBNAME = libptypes.a diff --git a/devel/ptypes/files/patch-wshare-Makefile.common b/devel/ptypes/files/patch-wshare-Makefile.common index bbb0a082e654..fe93f23fa87d 100644 --- a/devel/ptypes/files/patch-wshare-Makefile.common +++ b/devel/ptypes/files/patch-wshare-Makefile.common @@ -5,10 +5,10 @@ .SUFFIXES: .cxx .o -DDEBUG = -DDEBUG -+DDEBUG = ++DDEBUG = $(DEBUG_FLAGS) INCDIR = ../include -CXXOPTS = $(OS_CXXOPTS) $(DDEBUG) -I$(INCDIR) -Wall -O2 -+CXXOPTS = $(OS_CXXOPTS) $(DDEBUG) -I$(INCDIR) -Wall $(CFLAGS) ++CXXOPTS = $(OS_CXXOPTS) $(DDEBUG) -I$(INCDIR) -Wall $(PTYPES_CFLAGS) LDLIBS = $(OS_LDLIBS) BINDEST = ../bin -- cgit v1.2.3