Blob Blame Raw
From c062ab4950e9894f6dc8188b1516ade92267654b Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Thu, 14 Jun 2012 11:38:48 +0400
Subject: [PATCH 2/8] Cleanup Oracle's makefiles

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
 modules/db_oracle/Makefile | 54 ++--------------------------------------------
 utils/db_oracle/Makefile   | 52 ++------------------------------------------
 2 files changed, 4 insertions(+), 102 deletions(-)

diff --git a/modules/db_oracle/Makefile b/modules/db_oracle/Makefile
index 6b7e685..a721aba 100644
--- a/modules/db_oracle/Makefile
+++ b/modules/db_oracle/Makefile
@@ -6,57 +6,7 @@ include ../../Makefile.defs
 auto_gen=
 NAME=db_oracle.so
 
-# can be defined for non standard placement of oracle so's
-ORAPATH=
-LIBS=
-
-# use for multiple client sdk version install
-ifneq ($(ORAVERSION),)
-    ORAVERDIR=/$(ORAVERSION)
-endif
-
-# use include/library path's for full client installation
-ifneq ($(ORAHOME),)
-    DEFS +=-I$(ORAHOME)/include
-    LIBS +=-L$(ORAHOME)/lib
-ifeq ($(ORAPATH),)
-    ORAPATH=$(ORAHOME)/lib
-endif
-else
-# use standard know paths oci.h locations (linux)
-DEFS +=-I$(LOCALBASE)/include/oracle$(ORAVERDIR) \
-    -I$(SYSBASE)/include/oracle$(ORAVERDIR)
-endif
-
-# search 'so' path if it non standard (possible liboclntsh locations on linux)
-ifeq ($(ORAPATH),)
-    ORAPATH=$(shell [ -f $(LOCALBASE)/lib64/oracle$(ORAVERDIR)/libocci.so ] && \
-	    echo $(LOCALBASE)/lib64/oracle$(ORAVERDIR) )
-endif
-ifeq ($(ORAPATH),)
-    ORAPATH=$(shell [ -f $(SYSBASE)/lib64/oracle$(ORAVERDIR)/libocci.so ] && \
-	    echo $(SYSBASE)/lib64/oracle$(ORAVERDIR) )
-endif
-ifeq ($(ORAPATH),)
-    ORAPATH=$(shell [ -f $(SYSBASE)/lib/oracle$(ORAVERDIR)/libocci.so ] && \
-	    echo $(SYSBASE)/lib/oracle$(ORAVERDIR) )
-endif
-ifeq ($(ORAPATH),)
-    ORAPATH=$(shell [ -f $(SYSBASE)/lib/oracle$(ORAVERDIR)/libocci.so ] && \
-	    echo $(SYSBASE)/lib/oracle$(ORAVERDIR) )
-endif
-
-ifneq ($(ORAPATH),)
-    LIBS +=-L$(ORAPATH)
-endif
-
-LIBS +=-locci -lclntsh
-
-#DEFS+=-DLINUX -D_GNU_SOURCE -D_REENTRANT
-#LIBS+=-lpthread
-
-ifneq ($(ORAPATH),)
-    LIBS +=-Wl,-rpath $(ORAPATH)
-endif
+DEFS +=-I$(ORAHOME)/include
+LIBS +=-L$(ORAHOME)/lib -locci -lclntsh
 
 include ../../Makefile.modules
diff --git a/utils/db_oracle/Makefile b/utils/db_oracle/Makefile
index b1c8231..9565134 100644
--- a/utils/db_oracle/Makefile
+++ b/utils/db_oracle/Makefile
@@ -10,56 +10,8 @@ NAME=opensips_orasel
 
 include ../../Makefile.sources
 
-ORAPATH=
-
-# use for multiple client sdk version install
-ifneq ($(ORAVERSION),)
-    ORAVERDIR=/$(ORAVERSION)
-endif
-
-# use include/library path's for full client installation
-ifneq ($(ORAHOME),)
-    DEFS +=-I$(ORAHOME)/include
-    LIBS +=-L$(ORAHOME)/lib
-ifeq ($(ORAPATH),)
-    ORAPATH=$(ORAHOME)/lib
-endif
-else
-# use standard know paths oci.h locations (linux)
-    DEFS +=-I$(LOCALBASE)/include/oracle$(ORAVERDIR) \
-	-I$(SYSBASE)/include/oracle$(ORAVERDIR)
-endif
-
-# search 'so' path if it non standard (possible liboclntsh locations on linux)
-ifeq ($(ORAPATH),)
-    ORAPATH=$(shell [ -f $(LOCALBASE)/lib64/oracle$(ORAVERDIR)/libocci.so ] && \
-	    echo $(LOCALBASE)/lib64/oracle$(ORAVERDIR) )
-endif
-ifeq ($(ORAPATH),)
-    ORAPATH=$(shell [ -f $(SYSBASE)/lib64/oracle$(ORAVERDIR)/libocci.so ] && \
-	    echo $(SYSBASE)/lib64/oracle$(ORAVERDIR) )
-endif
-ifeq ($(ORAPATH),)
-    ORAPATH=$(shell [ -f $(SYSBASE)/lib/oracle$(ORAVERDIR)/libocci.so ] && \
-	    echo $(SYSBASE)/lib/oracle$(ORAVERDIR) )
-endif
-ifeq ($(ORAPATH),)
-    ORAPATH=$(shell [ -f $(SYSBASE)/lib/oracle$(ORAVERDIR)/libocci.so ] && \
-	    echo $(SYSBASE)/lib/oracle$(ORAVERDIR) )
-endif
-
-ifneq ($(ORAPATH),)
-    LIBS +=-L$(ORAPATH)
-endif
-
-LIBS +=-locci -lclntsh
-
-#DEFS +=-DLINUX -D_GNU_SOURCE -D_REENTRANT
-#LIBS +=-lpthread
-
-ifneq ($(ORAPATH),)
-    LIBS +=-Wl,-rpath $(ORAPATH)
-endif
+DEFS +=-I$(ORAHOME)/include
+LIBS +=-L$(ORAHOME)/lib -locci -lclntsh
 
 include ../../Makefile.rules
 
-- 
1.8.1