$OpenBSD: patch-make_unix_mak,v 1.3 2008/09/08 17:17:10 ajacoutot Exp $ --- make/unix.mak.orig Fri Oct 19 08:22:33 2007 +++ make/unix.mak Mon Sep 8 18:05:20 2008 @@ -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 !!PREFIX!!/bin/ptlib-config --libdir) endif # linux @@ -481,7 +481,7 @@ endif # FreeBSD ifeq ($(OSTYPE),OpenBSD) ifeq ($(MACHTYPE),x86) -STDCCFLAGS += -m486 +#STDCCFLAGS += -m486 endif LDLIBS += -lossaudio @@ -489,6 +489,7 @@ LDLIBS += -lossaudio P_USE_RANLIB := 1 #STDCCFLAGS += -DP_USE_PRAGMA # migrated to configure +STDCCFLAGS += -fPIC endif # OpenBSD @@ -503,7 +504,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 +909,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 +951,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 +986,7 @@ ifneq ($(OSTYPE),Darwin) ifeq ($(OSTYPE),solaris) OPTCCFLAGS += -O3 else - OPTCCFLAGS += -Os + OPTCCFLAGS += endif else OPTCCFLAGS += -O2