4
4
#
5
5
# Copyright (c) 1994, Regents of the University of California
6
6
#
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 $
8
8
#
9
9
# -------------------------------------------------------------------------
10
10
@@ -17,25 +17,28 @@ SO_MAJOR_VERSION= 4
17
17
SO_MINOR_VERSION = 2
18
18
19
19
override CPPFLAGS := -I$(top_srcdir ) /src/interfaces/ecpg/include \
20
- -I$(libpq_srcdir ) $(CPPFLAGS )
20
+ -I$(libpq_srcdir ) -I $( top_builddir ) /src/port $(CPPFLAGS )
21
21
override CFLAGS += $(PTHREAD_CFLAGS )
22
22
23
23
OBJS = 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
25
25
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 ) \
32
27
$(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS ) ) $(PTHREAD_LIBS )
33
28
34
29
all : all-lib
35
30
36
31
# Shared library stuff
37
32
include $(top_srcdir ) /src/Makefile.shlib
38
33
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
+
39
42
install : all installdirs install-lib
40
43
41
44
installdirs :
@@ -44,7 +47,7 @@ installdirs:
44
47
uninstall : uninstall-lib
45
48
46
49
clean distclean maintainer-clean : clean-lib
47
- rm -f $(OBJS )
50
+ rm -f $(OBJS ) path.c
48
51
49
52
depend dep :
50
53
$(CC ) -MM $(CFLAGS ) * .c > depend
0 commit comments