Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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_postgres.so
  6. # set CROSS_COMPILE to true if you want to skip
  7. # the autodetection
  8. # CROSS_COMPILE=true
  9. ifeq ($(CROSS_COMPILE),)
  10. PGCFG=$(shell which pg_config)
  11. endif
  12. ifneq ($(PGCFG),)
  13. # use autodetection
  14. DEFS += -I$(shell $(PGCFG) --includedir)
  15. LIBS += -L$(shell $(PGCFG) --libdir) -lpq
  16. else
  17. # use standard know paths
  18. # libpq-fe.h locations
  19. DEFS +=-I$(LOCALBASE)/include -I$(LOCALBASE)/pgsql/include \
  20. -I$(SYSBASE)/include/pgsql -I$(SYSBASE)/include/postgresql \
  21. -I$(SYSBASE)/include/postgresql/8.0
  22. LIBS +=-L$(LOCALBASE)/lib -L$(LOCALBASE)/pgsql/lib \
  23. -L$(LOCALBASE)/lib/pgsql -lpq
  24. endif
  25. #DEFS += -DPG_TEST
  26. DEFS += -DSER_MOD_INTERFACE
  27. SERLIBPATH=../../lib
  28. SER_LIBS=$(SERLIBPATH)/srdb2/srdb2 $(SERLIBPATH)/srdb1/srdb1
  29. include ../../Makefile.modules
  30. ifeq ($(INSTALL_FLAVOUR),kamailio)
  31. # extra install for kamailio
  32. install-pgsql-scripts: $(bin_prefix)/$(bin_dir)
  33. PGSQLON=yes $(MAKE) -C ../../utils/kamctl/ install-modules
  34. install-scripts: install-pgsql-scripts
  35. endif # INSTALL_FLAVOUR