Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0a54441

Browse files
committed
Here's a patch that will allow external modules like pl<lang> to set
additional flags for the dlltool and dllwrap commands. More info here: http://archives.postgresql.org/pgsql-hackers/2004-05/msg00350.php Thomas Hallgren
1 parent b1ffacd commit 0a54441

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

src/Makefile.shlib

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Copyright (c) 1998, Regents of the University of California
77
#
88
# IDENTIFICATION
9-
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.74 2003/12/01 22:23:06 momjian Exp $
9+
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.75 2004/05/12 21:56:27 momjian Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

@@ -26,6 +26,12 @@
2626
# additional stuff to put in its link command
2727
# (If you want a patchlevel, include it in SO_MINOR_VERSION, e.g., "6.2".)
2828
#
29+
# Optional flags when building DLL's (only applicable to win32 and cygwin
30+
# platforms).
31+
# DLLTOOL_DEFFLAGS Additional flags when creating the dll .def file
32+
# DLLTOOL_LIBFLAGS Additional flags when creating the lib<module>.a file
33+
# DLLWRAP_FLAGS Additional flags to dllwrap
34+
#
2935
# The module Makefile must also include
3036
# $(top_builddir)/src/Makefile.global before including this file.
3137
# (Makefile.global sets PORTNAME and other needed symbols.)
@@ -284,19 +290,19 @@ else # PORTNAME == win32
284290

285291
# win32 case
286292
$(shlib) lib$(NAME).a: $(OBJS)
287-
$(DLLTOOL) --export-all --output-def $(NAME).def $(OBJS)
288-
$(DLLWRAP) -o $(shlib) --dllname $(shlib) --def $(NAME).def $(OBJS) $(SHLIB_LINK)
289-
$(DLLTOOL) --dllname $(shlib) --def $(NAME).def --output-lib lib$(NAME).a
293+
$(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS)
294+
$(DLLWRAP) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK)
295+
$(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def --output-lib lib$(NAME).a
290296

291297
endif # PORTNAME == win32
292298

293299
else # PORTNAME == cygwin
294300

295301
# Cygwin case
296302
$(shlib) lib$(NAME).a: $(OBJS) $(DLLINIT)
297-
$(DLLTOOL) --export-all --output-def $(NAME).def $(OBJS)
298-
$(DLLWRAP) -o $(shlib) --dllname $(shlib) --def $(NAME).def $(OBJS) $(DLLINIT) $(SHLIB_LINK)
299-
$(DLLTOOL) --dllname $(shlib) --def $(NAME).def --output-lib lib$(NAME).a
303+
$(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS)
304+
$(DLLWRAP) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(DLLINIT) $(SHLIB_LINK)
305+
$(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def --output-lib lib$(NAME).a
300306

301307
$(DLLINIT): $(DLLINIT:%.o=%.c)
302308
$(MAKE) -C $(@D) $(@F)

0 commit comments

Comments
 (0)