openbsd-ports/devel/ptlib/patches/patch-make_lib_mak
2012-08-25 13:15:23 +00:00

37 lines
1.0 KiB
Plaintext

$OpenBSD: patch-make_lib_mak,v 1.7 2012/08/25 13:15:24 ajacoutot Exp $
--- make/lib.mak.orig Thu Aug 23 04:12:44 2012
+++ make/lib.mak Fri Aug 24 07:59:24 2012
@@ -28,6 +28,13 @@
# $Date: 2012/08/25 13:15:24 $
#
+ifeq ($(OSTYPE),OpenBSD)
+ ifeq ($(BUILD_TYPE),.)
+ LIBNAME_PAT = $(LIB_FILENAME).$(MAJOR_VERSION).$(MINOR_VERSION)
+ else
+ LIBNAME_PAT = $(LIB_FILENAME).$(MAJOR_VERSION).$(MINOR_VERSION)-$(BUILD_TYPE)
+ endif
+else
ifeq (,$(findstring $(OSTYPE),Darwin cygwin mingw))
ifeq ($(BUILD_TYPE),.)
LIBNAME_PAT = $(LIB_FILENAME).$(MAJOR_VERSION).$(MINOR_VERSION).$(BUILD_NUMBER)
@@ -41,6 +48,7 @@ else
LIBNAME_PAT = $(subst .$(LIB_SUFFIX),.$(MAJOR_VERSION).$(MINOR_VERSION)-$(BUILD_TYPE)$(BUILD_NUMBER).$(LIB_SUFFIX),$(LIB_FILENAME))
endif
endif
+endif
LIB_SONAME = $(LIBNAME_PAT)
@@ -101,6 +109,10 @@ ifeq ($(P_SHAREDLIB),1)
LDSOOPTS += -Wl,-soname,$(LIB_SONAME)
endif
endif
+ endif
+
+ ifeq ($(OSTYPE),OpenBSD)
+ LDSOOPTS += -fPIC
endif
$(LIBDIR)/$(LIB_FILENAME): $(LIBDIR)/$(LIBNAME_PAT)