Avoid using dllwrap to build pgevent in Mingw builds.
authorTom Lane <[email protected]>
Thu, 20 Feb 2014 00:34:50 +0000 (19:34 -0500)
committerTom Lane <[email protected]>
Thu, 20 Feb 2014 00:34:50 +0000 (19:34 -0500)
If this works, we can get rid of configure's support for locating dllwrap
... but let's see what the buildfarm says, first.

Hiroshi Inoue

src/bin/pgevent/Makefile
src/bin/pgevent/exports.txt [new file with mode: 0644]

index 1d902762c567d0e8e8c82129ab9f95908c0c5159..d3c73297a7e136b58fc9da029ced18488c32dbe6 100644 (file)
@@ -17,30 +17,21 @@ include $(top_builddir)/src/Makefile.global
 ifeq ($(PORTNAME), win32)
 
 OBJS=pgevent.o pgmsgevent.o
-NAME=pgevent.dll
+NAME=pgevent
 
-all: $(NAME)
+SHLIB_LINK =
+SHLIB_EXPORTS = exports.txt
+
+all: all-lib
 
 install: all install-lib
 
-pgevent.dll: pgevent.def $(OBJS)
-       $(DLLWRAP) --def $< -o $(NAME) $(OBJS)
+include $(top_srcdir)/src/Makefile.shlib
 
 pgmsgevent.o: pgmsgevent.rc win32ver.rc
        $(WINDRES) $< -o $@ --include-dir=$(top_builddir)/src/include --include-dir=$(top_srcdir)/src/include --include-dir=$(srcdir) --include-dir=.
 
-all-lib: $(NAME)
-
-install-lib: $(NAME)
-       $(INSTALL_STLIB) $< '$(DESTDIR)$(libdir)/$<'
-
-uninstall-lib:
-       rm -f '$(DESTDIR)$(libdir)/$(NAME)'
-
-clean distclean:
-       rm -f $(OBJS) $(NAME) win32ver.rc
-
-clean-lib:
-       rm -f $(NAME)
+clean distclean: clean-lib
+       rm -f $(OBJS) win32ver.rc
 
 endif
diff --git a/src/bin/pgevent/exports.txt b/src/bin/pgevent/exports.txt
new file mode 100644 (file)
index 0000000..70dcd25
--- /dev/null
@@ -0,0 +1,5 @@
+; dlltool --output-def pgevent.def pgevent.o pgmsgevent.o
+EXPORTS
+       DllUnregisterServer@0 ;
+       DllRegisterServer@0 ;
+       DllInstall ;