[asterisk-commits] branch oej/test-this-branch r12870 - /team/oej/test-this-branch/res/Makefile

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Mar 14 03:47:46 MST 2006


Author: oej
Date: Tue Mar 14 04:47:44 2006
New Revision: 12870

URL: http://svn.digium.com/view/asterisk?rev=12870&view=rev
Log:
Try to make postgresql compile AND link :-)

Modified:
    team/oej/test-this-branch/res/Makefile

Modified: team/oej/test-this-branch/res/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/res/Makefile?rev=12870&r1=12869&r2=12870&view=diff
==============================================================================
--- team/oej/test-this-branch/res/Makefile (original)
+++ team/oej/test-this-branch/res/Makefile Tue Mar 14 04:47:44 2006
@@ -67,6 +67,41 @@
 ifeq (${WITH_SMDI},)
   MODS:=$(filter-out res_smdi.so,$(MODS))
 endif
+
+# Now, go find postgresql libraries
+fneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/postgresql),)
+  CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/include/postgresql
+  MLFLAGS+=-L$(CROSS_COMPILE_TARGET)/usr/lib/postgresql
+endif
+
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/pgsql/include),)
+  CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/pgsql/include
+  MLFLAGS+=-L$(CROSS_COMPILE_TARGET)/usr/local/pgsql/lib
+endif
+
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/pgsql),)
+  CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/include/pgsql
+  MLFLAGS+=-L$(CROSS_COMPILE_TARGET)/usr/lib/pgsql
+endif
+
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/pgsql),)
+  CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include/pgsql
+  MLFLAGS+=-L$(CROSS_COMPILE_TARGET)/usr/local/lib/pgsql
+endif
+
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/opt/pgsql/include),)
+  CFLAGS+=-I$(CROSS_COMPILE_TARGET)/opt/pgsql/include
+  MLFLAGS+=-L$(CROSS_COMPILE_TARGET) /opt/pgsql/lib
+endif
+
+ifneq ($(wilcard $(CROSS_COMPILE_TARGET)/usr/include/postgresql),)
+  CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/include/postgresql
+endif
+
+ifneq ($(wilcard $(CROSS_COMPILE_TARGET)/usr/lib/libpq.so),)
+  MLFLAGS+=-L$(CROSS_COMPILE_TARGET)/usr/lib
+endif
+
 
 ifeq (${OSARCH},CYGWIN)
   CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
@@ -79,6 +114,8 @@
 CRYPTO_LIBS=-lssl -lcrypto
 
 CFLAGS+=
+
+MLFLAGS=
 
 ifndef WITHOUT_ZAPTEL
 ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h),)
@@ -146,6 +183,10 @@
 res_config_ldap.so: res_config_ldap.o
 	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lldap
 
+res_config_pgsql.so: res_config_pgsql.o
+	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lpq -lz $(MLFLAGS)
+
+
 
 ifneq ($(wildcard .depend),)
   include .depend



More information about the asterisk-commits mailing list