aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-12-01 22:23:06 +0000
committerBruce Momjian <bruce@momjian.us>2003-12-01 22:23:06 +0000
commitc217b36e17351b80cd545943f26c118e42649ea1 (patch)
treebd35d8ff9a0e76399e434a13af8288ac01b13094
parent9be15f4d528a11cb4b81bb7002bde3f5c34fc241 (diff)
downloadpostgresql-c217b36e17351b80cd545943f26c118e42649ea1.tar.gz
postgresql-c217b36e17351b80cd545943f26c118e42649ea1.zip
Win32 patch for Makefile.shlib
Claudio Natoli
-rw-r--r--src/Makefile.shlib25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index b2df1de003b..003aefb2e6c 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -6,7 +6,7 @@
# Copyright (c) 1998, Regents of the University of California
#
# IDENTIFICATION
-# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.73 2003/11/29 19:51:39 pgsql Exp $
+# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.74 2003/12/01 22:23:06 momjian Exp $
#
#-------------------------------------------------------------------------
@@ -201,6 +201,10 @@ ifeq ($(PORTNAME), cygwin)
shlib := $(NAME)$(DLSUFFIX)
endif
+ifeq ($(PORTNAME), win32)
+ shlib := lib$(NAME)$(DLSUFFIX)
+endif
+
ifeq ($(PORTNAME), beos)
shlib := lib$(NAME)$(DLSUFFIX)
LINK.shared = $(LD) -nostart
@@ -229,6 +233,7 @@ all-static-lib: lib$(NAME).a
all-shared-lib: $(shlib)
ifneq ($(PORTNAME), cygwin)
+ifneq ($(PORTNAME), win32)
ifndef LORDER
MK_NO_LORDER := true
@@ -242,12 +247,14 @@ else
endif
$(RANLIB) $@
+endif # not win32
endif # not cygwin
ifeq ($(enable_shared), yes)
ifneq ($(PORTNAME), beos)
ifneq ($(PORTNAME), cygwin)
+ifneq ($(PORTNAME), win32)
ifneq ($(PORTNAME), aix)
# Normal case
@@ -273,6 +280,16 @@ $(shlib): lib$(NAME).a
endif # PORTNAME == aix
+else # PORTNAME == win32
+
+# win32 case
+$(shlib) lib$(NAME).a: $(OBJS)
+ $(DLLTOOL) --export-all --output-def $(NAME).def $(OBJS)
+ $(DLLWRAP) -o $(shlib) --dllname $(shlib) --def $(NAME).def $(OBJS) $(SHLIB_LINK)
+ $(DLLTOOL) --dllname $(shlib) --def $(NAME).def --output-lib lib$(NAME).a
+
+endif # PORTNAME == win32
+
else # PORTNAME == cygwin
# Cygwin case
@@ -316,6 +333,7 @@ ifeq ($(enable_shared), yes)
install-lib-shared: $(shlib)
$(INSTALL_SHLIB) $< $(DESTDIR)$(libdir)/$(shlib)
ifneq ($(PORTNAME), cygwin)
+ifneq ($(PORTNAME), win32)
ifneq ($(shlib), lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION))
cd $(DESTDIR)$(libdir) && \
rm -f lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) && \
@@ -327,6 +345,7 @@ ifneq ($(shlib), lib$(NAME)$(DLSUFFIX))
$(LN_S) $(shlib) lib$(NAME)$(DLSUFFIX)
endif
+endif # not win32
endif # not cygwin
endif # enable_shared
@@ -361,3 +380,7 @@ endif
ifeq ($(PORTNAME), cygwin)
rm -f $(NAME).dll $(NAME).def
endif
+
+ifeq ($(PORTNAME), win32)
+ rm -f $(NAME).dll $(NAME).def
+endif