[Opalvoip-devel] Some fix and tuning of PTLIB unix.mak
Brought to you by:
csoutheren,
rjongbloed
|
From: Yuriy C. <yur...@gm...> - 2009-10-19 14:29:51
|
Hi OPAL community.
Today I wish to build threadex ptlib sample.
Make target opt and debug work ok, but target optstatic and debugstatis does
not work.
During for example optstatic build it try to link with "libpt.a" when PTLIB
make "ptlib_s.a",
so suffix "_s" does not add.
As I understand this suffix must be specified in unix.mak throw LIB_TYPE
variable which does
not assign with "_s" if P_SHAREDLIB = 0.
Then if I wish build 4 different version (opt debug optstatic debugstatis)
of threadex ptlib
sample I can't, because output directory does not include "_s" suffix too.
As I understand suffix must be specified in unix.mak too throw OBJDIR_SUFFIX
variable.
Patch to solve this 2 problems (review it please and if all is ok than
commit):
Index: make/unix.mak
===================================================================
--- make/unix.mak (revision 23683)
+++ make/unix.mak (working copy)
@@ -568,10 +568,6 @@
endif # DEBUG
endif # OBJ_SUFFIX
-ifndef OBJDIR_SUFFIX
-OBJDIR_SUFFIX = $(OBJ_SUFFIX)
-endif
-
ifndef STATICLIBEXT
STATICLIBEXT = a
endif
@@ -581,9 +577,13 @@
LIB_TYPE =
else
LIB_SUFFIX = a
-LIB_TYPE =
+LIB_TYPE = _s
endif # P_SHAREDLIB
+ifndef OBJDIR_SUFFIX
+OBJDIR_SUFFIX = $(OBJ_SUFFIX)$(LIB_TYPE)
+endif
+
ifndef INSTALL_DIR
INSTALL_DIR = ${PREFIX}
endif
Truly yours, Yuriy.
|