Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # $Id$
  2. #
  3. # WARNING: do not run this directly, it should be run by the master Makefile
  4. include ../../Makefile.defs
  5. auto_gen=
  6. NAME=db_oracle.so
  7. # can be defined for non standard placement of oracle so's
  8. ORAPATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client
  9. DEFS += -I$(ORAPATH)/rdbms/public
  10. LIBS += -L$(ORAPATH)/lib
  11. # use for multiple client sdk version install
  12. ifneq ($(ORAVERSION),)
  13. ORAVERDIR=/$(ORAVERSION)
  14. endif
  15. # use include/library path's for full client installation
  16. ifneq ($(ORAHOME),)
  17. DEFS +=-I$(ORAHOME)/include
  18. LIBS +=-L$(ORAHOME)/lib
  19. ifeq ($(ORAPATH),)
  20. ORAPATH=$(ORAHOME)/lib
  21. endif
  22. else
  23. # use standard know paths oci.h locations (linux)
  24. DEFS +=-I$(LOCALBASE)/include/oracle$(ORAVERDIR) \
  25. -I$(SYSBASE)/include/oracle$(ORAVERDIR)
  26. endif
  27. # search 'so' path if it non standard (possible liboclntsh locations on linux)
  28. ifeq ($(ORAPATH),)
  29. ORAPATH=$(shell [ -f $(LOCALBASE)/lib64/oracle$(ORAVERDIR)/libocci.so ] && \
  30. echo $(LOCALBASE)/lib64/oracle$(ORAVERDIR) )
  31. endif
  32. ifeq ($(ORAPATH),)
  33. ORAPATH=$(shell [ -f $(SYSBASE)/lib64/oracle$(ORAVERDIR)/libocci.so ] && \
  34. echo $(SYSBASE)/lib64/oracle$(ORAVERDIR) )
  35. endif
  36. ifeq ($(ORAPATH),)
  37. ORAPATH=$(shell [ -f $(SYSBASE)/lib/oracle$(ORAVERDIR)/libocci.so ] && \
  38. echo $(SYSBASE)/lib/oracle$(ORAVERDIR) )
  39. endif
  40. ifeq ($(ORAPATH),)
  41. ORAPATH=$(shell [ -f $(SYSBASE)/lib/oracle$(ORAVERDIR)/libocci.so ] && \
  42. echo $(SYSBASE)/lib/oracle$(ORAVERDIR) )
  43. endif
  44. ifneq ($(ORAPATH),)
  45. LIBS +=-L$(ORAPATH)
  46. endif
  47. LIBS +=-locci -lclntsh
  48. #DEFS+=-DLINUX -D_GNU_SOURCE -D_REENTRANT
  49. #LIBS+=-lpthread
  50. ifneq ($(ORAPATH),)
  51. LIBS +=-Wl,-rpath $(ORAPATH)
  52. endif
  53. DEFS+=-DKAMAILIO_MOD_INTERFACE
  54. SERLIBPATH=../../lib
  55. SER_LIBS+=$(SERLIBPATH)/srdb1/srdb1
  56. include ../../Makefile.modules
  57. ifeq ($(INSTALL_FLAVOUR),kamailio)
  58. # extra install for kamailio
  59. install-oracle-scripts: $(bin_prefix)/$(bin_dir)
  60. ORACLEON=yes make -C ../../utils/kamctl/ install-modules
  61. install-scripts: install-oracle-scripts
  62. endif # INSTALL_FLAVOUR