44#
55# Copyright (c) 1994, Regents of the University of California
66#
7- # $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/Makefile,v 1.21 2004/05/21 03:12:03 momjian Exp $
7+ # $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/Makefile,v 1.22 2004/05/21 21:56:02 tgl Exp $
88#
99# -------------------------------------------------------------------------
1010
@@ -17,25 +17,28 @@ SO_MAJOR_VERSION= 4
1717SO_MINOR_VERSION = 2
1818
1919override CPPFLAGS := -I$(top_srcdir ) /src/interfaces/ecpg/include \
20- -I$(libpq_srcdir ) $(CPPFLAGS )
20+ -I$(libpq_srcdir ) -I $( top_builddir ) /src/port $(CPPFLAGS )
2121override CFLAGS += $(PTHREAD_CFLAGS )
2222
2323OBJS = execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \
24- connect.o misc.o
24+ connect.o misc.o path.o
2525
26- # needed by dllwrap
27- ifeq ($(PORTNAME ) , win32)
28- PGPORT =-lpgport
29- endif
30-
31- SHLIB_LINK = -L../pgtypeslib -lpgtypes $(PGPORT ) $(libpq ) \
26+ SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq ) \
3227 $(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS ) ) $(PTHREAD_LIBS )
3328
3429all : all-lib
3530
3631# Shared library stuff
3732include $(top_srcdir ) /src/Makefile.shlib
3833
34+ # We use some port modules verbatim, but since we need to
35+ # compile with appropriate options to build a shared lib, we can't
36+ # necessarily use the same object files as the backend uses. Instead,
37+ # symlink the source files in here and build our own object file.
38+
39+ path.c : % : $(top_srcdir ) /src/port/%
40+ rm -f $@ && $(LN_S ) $< .
41+
3942install : all installdirs install-lib
4043
4144installdirs :
@@ -44,7 +47,7 @@ installdirs:
4447uninstall : uninstall-lib
4548
4649clean distclean maintainer-clean : clean-lib
47- rm -f $(OBJS )
50+ rm -f $(OBJS ) path.c
4851
4952depend dep :
5053 $(CC ) -MM $(CFLAGS ) * .c > depend
0 commit comments