44#
55# Copyright (c) 1994, Regents of the University of California
66#
7- # $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.109 2004/05/24 01:01:38 momjian Exp $
7+ # $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.110 2004/06/19 04:43:18 momjian Exp $
88#
99# -------------------------------------------------------------------------
1010
@@ -25,8 +25,14 @@ OBJS=fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o \
2525fe-protocol2.o fe-protocol3.o pqexpbuffer.o pqsignal.o fe-secure.o\
2626dllist.o md5.o ip.o wchar.o encnames.o noblock.o pgstrcasecmp.o thread.o\
2727$(filter crypt.o getaddrinfo.o inet_aton.o open.o snprintf.o strerror.o,$(LIBOBJS ) )
28+
2829ifeq ($(PORTNAME ) , win32)
2930OBJS+ =win32.o
31+ ifeq ($(enable_thread_safety ) , yes)
32+ # This doesn't work yet because configure test fails. 2004-06-19
33+ OBJS+ =pthread-win32.o
34+ PTHREAD_H_WIN32 =yes
35+ endif
3036endif
3137
3238
@@ -39,7 +45,7 @@ SHLIB_LINK += -lwsock32 -lws2_32
3945endif
4046
4147
42- all : all-lib
48+ all :$( PTHREAD_H_WIN32 ) all-lib
4349
4450# Shared library stuff
4551include $(top_srcdir ) /src/Makefile.shlib
@@ -66,6 +72,11 @@ encnames.c wchar.c : % : $(backend_src)/utils/mb/%
6672rm -f$@ && $(LN_S ) $< .
6773
6874
75+ ifeq ($(PTHREAD_H_WIN32 ) )
76+ pthread.h :% :$(top_srcdir ) /src/interfaces/libpq/pthread.h.win
77+ rm -f$@ && $(LN_S ) $< .
78+ endif
79+
6980install : all installdirs install-lib
7081$(INSTALL_DATA ) $(srcdir ) /libpq-fe.h$(DESTDIR )$(includedir )
7182$(INSTALL_DATA ) $(srcdir ) /libpq-int.h$(DESTDIR )$(includedir_internal )
@@ -79,4 +90,4 @@ uninstall: uninstall-lib
7990rm -f$(DESTDIR )$(includedir ) /libpq-fe.h$(DESTDIR )$(includedir_internal ) /libpq-int.h$(DESTDIR )$(includedir_internal ) /pqexpbuffer.h
8091
8192clean distclean maintainer-clean : clean-lib
82- rm -f$(OBJS ) crypt.c getaddrinfo.c inet_aton.c noblock.c pgstrcasecmp.c snprintf.c strerror.c open.c thread.c dllist.c md5.c ip.c encnames.c wchar.c
93+ rm -f$(OBJS ) crypt.c getaddrinfo.c inet_aton.c noblock.c pgstrcasecmp.c snprintf.c strerror.c open.c thread.c dllist.c md5.c ip.c encnames.c wchar.c pthread.h