Makefile 2.0 KB

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