diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-10-01 15:03:30 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-10-01 15:03:30 +0000 |
commit | bad005116b9e02951f170bfc59bbd4fe4bf0ec35 (patch) | |
tree | 0715565e64a68799b75dd9e6de8e8f27ee6c09a0 /cdr/Makefile | |
parent | 4ccc73bca703f3ae6e585a473493566bed2bfce8 (diff) |
Add PGSQL support
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1594 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cdr/Makefile')
-rwxr-xr-x | cdr/Makefile | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cdr/Makefile b/cdr/Makefile index 368a8508b..8b64bef3d 100755 --- a/cdr/Makefile +++ b/cdr/Makefile @@ -15,6 +15,21 @@ MODS=cdr_csv.so CFLAGS+=-fPIC +# +# MySQL stuff... Autoconf anyone?? +# +MODS+=$(shell if [ -d /usr/local/pgsql/include ] || [ -d /usr/include/pgsql ] || [ -d /usr/local/include/pgsql ] || [ -d /opt/pgsql/include ] || [ -f /usr/include/libpq-fe.h ] ; then echo "cdr_pgsql.so"; fi) +CFLAGS+=$(shell if [ -d /usr/local/pgsql/include ]; then echo "-I/usr/local/pgsql/include"; fi) +CFLAGS+=$(shell if [ -d /usr/include/pgsql ]; then echo "-I/usr/include/pgsql"; fi) +CFLAGS+=$(shell if [ -d /usr/local/include/pgsql ]; then echo "-I/usr/local/include/pgsql"; fi) +CFLAGS+=$(shell if [ -d /opt/pgsql/include ]; then echo "-I/opt/pgsql/include"; fi) +CFLAGS+=$(shell if [ -f /usr/include/libpq-fe.h ]; then echo "-I/usr/include"; fi) +MLFLAGS= +MLFLAGS+=$(shell if [ -d /usr/lib/pgsql ]; then echo "-L/usr/lib/pgsql"; fi) +MLFLAGS+=$(shell if [ -d /usr/local/pgsql/lib ]; then echo "-L/usr/local/pgsql/lib"; fi) +MLFLAGS+=$(shell if [ -d /usr/local/lib/pgsql ]; then echo "-L/usr/local/lib/pgsql"; fi) +MLFLAGS+=$(shell if [ -d /opt/pgsql/lib ]; then echo "-L/opt/pgsql/lib"; fi) +MLFLAGS+=$(shell if [ -f /usr/lib/libpq.so ]; then echo "-L/usr/lib"; fi) all: depend $(MODS) @@ -31,6 +46,9 @@ ifneq ($(wildcard .depend),) include .depend endif +cdr_pgsql.so: cdr_pgsql.o + $(CC) -shared -Xlinker -x -o $@ $< -lpq -lz $(MLFLAGS) + depend: .depend .depend: |