|
6 | 6 | # Copyright (c) 1998, Regents of the University of California
|
7 | 7 | #
|
8 | 8 | # IDENTIFICATION
|
9 |
| -# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.85 2004/10/15 05:11:00 momjian Exp $ |
| 9 | +# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.86 2004/10/16 03:26:43 momjian Exp $ |
10 | 10 | #
|
11 | 11 | #-------------------------------------------------------------------------
|
12 | 12 |
|
|
31 | 31 | # DLLTOOL_DEFFLAGS Additional flags when creating the dll .def file
|
32 | 32 | # DLLTOOL_LIBFLAGS Additional flags when creating the lib<module>.a file
|
33 | 33 | # DLLWRAP_FLAGS Additional flags to dllwrap
|
| 34 | +# DLL_DEFFILE Use pre-existing .def file instead of auto-generating |
| 35 | +# one with all exports in it (win32 only). |
34 | 36 | #
|
35 | 37 | # The module Makefile must also include
|
36 | 38 | # $(top_builddir)/src/Makefile.global before including this file.
|
@@ -306,19 +308,29 @@ else # PORTNAME == cygwin
|
306 | 308 |
|
307 | 309 | # Cygwin case
|
308 | 310 | $(shlib) lib$(NAME).a: $(OBJS)
|
| 311 | +ifndef DLL_DEFFILE |
309 | 312 | $(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS)
|
310 | 313 | $(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK)
|
311 | 314 | $(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def --output-lib lib$(NAME).a
|
| 315 | +else |
| 316 | + $(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(DLL_DEFFILE) $(OBJS) $(SHLIB_LINK) |
| 317 | + $(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(DLL_DEFFILE) --output-lib lib$(NAME).a |
| 318 | +endif |
312 | 319 |
|
313 | 320 | endif # PORTNAME == cygwin
|
314 | 321 |
|
315 | 322 | else # PORTNAME == win32
|
316 | 323 |
|
317 | 324 | # win32 case
|
318 | 325 | $(shlib) lib$(NAME).a: $(OBJS)
|
| 326 | +ifndef DLL_DEFFILE |
319 | 327 | $(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $(NAME).def $(OBJS)
|
320 | 328 | $(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK)
|
321 | 329 | $(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(NAME).def --output-lib lib$(NAME).a
|
| 330 | +else |
| 331 | + $(DLLWRAP) $(LDFLAGS_SL) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(DLL_DEFFILE) $(OBJS) $(SHLIB_LINK) |
| 332 | + $(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(DLL_DEFFILE) --output-lib lib$(NAME).a |
| 333 | +endif |
322 | 334 |
|
323 | 335 | endif # PORTNAME == win32
|
324 | 336 |
|
|
0 commit comments