Makefile 1.1 KB

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