$OpenBSD: patch-make_unix_mak,v 1.4 2009/01/17 12:30:08 jakemsr Exp $
--- make/unix.mak.orig	Thu Oct 18 23:22:33 2007
+++ make/unix.mak	Sat Jan 17 03:54:23 2009
@@ -454,7 +454,7 @@ endif # P_SHAREDLIB
 
 
 STATIC_LIBS	:= libstdc++.a libg++.a libm.a libc.a
-SYSLIBDIR	:= $(shell $(PWLIBDIR)/make/ptlib-config --libdir)
+SYSLIBDIR	:= $(shell /usr/local/bin/ptlib-config --libdir)
 
 endif # linux
 
@@ -481,14 +481,13 @@ endif # FreeBSD
 ifeq ($(OSTYPE),OpenBSD)
 
 ifeq ($(MACHTYPE),x86)
-STDCCFLAGS	+= -m486
+#STDCCFLAGS	+= -m486
 endif
 
-LDLIBS		+= -lossaudio
-
 P_USE_RANLIB		:= 1
 #STDCCFLAGS      += -DP_USE_PRAGMA		# migrated to configure
 
+STDCCFLAGS	+= -fPIC
 
 endif # OpenBSD
 
@@ -503,7 +502,7 @@ endif
 
 LDLIBS		+= -lossaudio
 
-STDCCFLAGS += -I$(UNIX_INC_DIR) -I$(PWLIBDIR)/include
+STDCCFLAGS += -I$(PWLIBDIR)/include
 
 # enable the USE_PTH line to compile using pth
 # enable the USE_NATIVE_THREADS line to compile using native threads
@@ -908,11 +907,11 @@ LIB_SUFFIX	= $(SHAREDLIBEXT)
 LIB_TYPE	=
 else   
 LIB_SUFFIX	= a 
-LIB_TYPE	= _s
+LIB_TYPE	=
 endif # P_SHAREDLIB
 
 ifndef INSTALL_DIR
-INSTALL_DIR	= /usr/local
+INSTALL_DIR	= ${PREFIX}
 endif
 
 ifndef INSTALLBIN_DIR
@@ -950,8 +949,10 @@ endif
 PW_LIBDIR	= $(PWLIBDIR)/lib
 
 # set name of the PT library
-PTLIB_BASE	= pt_$(PLATFORM_TYPE)_$(OBJ_SUFFIX)
+PTLIB_BASE	= pt
+ifndef PTLIB_FILE
 PTLIB_FILE	= lib$(PTLIB_BASE)$(LIB_TYPE).$(LIB_SUFFIX)
+endif
 PT_OBJBASE	= obj_$(PLATFORM_TYPE)_$(OBJDIR_SUFFIX)
 PT_OBJDIR	= $(PW_LIBDIR)/$(PT_OBJBASE)
 
@@ -983,7 +984,7 @@ ifneq ($(OSTYPE),Darwin)
   ifeq ($(OSTYPE),solaris)
     OPTCCFLAGS	+= -O3 
   else
-    OPTCCFLAGS	+= -Os 
+    OPTCCFLAGS	+=
   endif
 else
   OPTCCFLAGS	+= -O2
