2003-03-16 11:42:54 +01:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Makefile for ecpg library
|
|
|
|
#
|
|
|
|
# Copyright (c) 1994, Regents of the University of California
|
|
|
|
#
|
2004-10-12 06:48:36 +02:00
|
|
|
# $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/Makefile,v 1.28 2004/10/12 04:48:35 neilc Exp $
|
2003-03-16 11:42:54 +01:00
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
subdir = src/interfaces/ecpg/ecpglib
|
|
|
|
top_builddir = ../../../..
|
|
|
|
include $(top_builddir)/src/Makefile.global
|
|
|
|
|
|
|
|
NAME= ecpg
|
2003-06-15 06:07:58 +02:00
|
|
|
SO_MAJOR_VERSION= 4
|
2004-03-14 13:16:30 +01:00
|
|
|
SO_MINOR_VERSION= 2
|
2004-07-13 02:06:46 +02:00
|
|
|
DLTYPE= library
|
2003-03-16 11:42:54 +01:00
|
|
|
|
2004-05-25 23:20:44 +02:00
|
|
|
override CPPFLAGS := -DFRONTEND -I$(top_srcdir)/src/interfaces/ecpg/include \
|
2004-05-21 23:56:02 +02:00
|
|
|
-I$(libpq_srcdir) -I$(top_builddir)/src/port $(CPPFLAGS)
|
2004-04-25 22:57:32 +02:00
|
|
|
override CFLAGS += $(PTHREAD_CFLAGS)
|
2003-03-16 11:42:54 +01:00
|
|
|
|
2004-10-04 22:36:12 +02:00
|
|
|
# Need to recomple any libpgport object files
|
|
|
|
LIBS := $(patsubst -lpgport,, $(LIBS))
|
|
|
|
|
2003-03-16 11:42:54 +01:00
|
|
|
OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \
|
2004-05-25 19:35:51 +02:00
|
|
|
connect.o misc.o path.o exec.o
|
2003-03-16 11:42:54 +01:00
|
|
|
|
2004-05-21 23:56:02 +02:00
|
|
|
SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) \
|
2004-04-23 20:15:55 +02:00
|
|
|
$(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) $(PTHREAD_LIBS)
|
2003-03-16 11:42:54 +01:00
|
|
|
|
2004-10-12 06:48:36 +02:00
|
|
|
all: $(top_builddir)/src/port/pg_config_paths.h all-lib
|
2003-03-16 11:42:54 +01:00
|
|
|
|
|
|
|
# Shared library stuff
|
|
|
|
include $(top_srcdir)/src/Makefile.shlib
|
|
|
|
|
2004-05-21 23:56:02 +02:00
|
|
|
# We use some port modules verbatim, but since we need to
|
|
|
|
# compile with appropriate options to build a shared lib, we can't
|
|
|
|
# necessarily use the same object files as the backend uses. Instead,
|
|
|
|
# symlink the source files in here and build our own object file.
|
|
|
|
|
|
|
|
path.c: % : $(top_srcdir)/src/port/%
|
|
|
|
rm -f $@ && $(LN_S) $< .
|
|
|
|
|
2004-05-25 19:35:51 +02:00
|
|
|
exec.c: % : $(top_srcdir)/src/port/%
|
|
|
|
rm -f $@ && $(LN_S) $< .
|
|
|
|
|
2004-10-12 03:04:11 +02:00
|
|
|
$(top_srcdir)/src/port/pg_config_paths.h:
|
|
|
|
$(MAKE) -C $(top_srcdir)/src/port pg_config_paths.h
|
|
|
|
|
2003-03-16 11:42:54 +01:00
|
|
|
install: all installdirs install-lib
|
|
|
|
|
|
|
|
installdirs:
|
|
|
|
$(mkinstalldirs) $(DESTDIR)$(libdir)
|
|
|
|
|
|
|
|
uninstall: uninstall-lib
|
|
|
|
|
|
|
|
clean distclean maintainer-clean: clean-lib
|
2004-05-25 19:35:51 +02:00
|
|
|
rm -f $(OBJS) path.c exec.c
|
2003-03-16 11:42:54 +01:00
|
|
|
|
|
|
|
depend dep:
|
|
|
|
$(CC) -MM $(CFLAGS) *.c >depend
|
|
|
|
|
|
|
|
ifeq (depend,$(wildcard depend))
|
|
|
|
include depend
|
|
|
|
endif
|