6
6
# Copyright (c) 1998, Regents of the University of California
7
7
#
8
8
# IDENTIFICATION
9
- # $PostgreSQL: pgsql/src/Makefile.shlib,v 1.73 2003/11/29 19:51:39 pgsql Exp $
9
+ # $PostgreSQL: pgsql/src/Makefile.shlib,v 1.74 2003/12/01 22:23:06 momjian Exp $
10
10
#
11
11
#-------------------------------------------------------------------------
12
12
@@ -201,6 +201,10 @@ ifeq ($(PORTNAME), cygwin)
201
201
shlib := $(NAME)$(DLSUFFIX)
202
202
endif
203
203
204
+ ifeq ($(PORTNAME), win32)
205
+ shlib := lib$(NAME)$(DLSUFFIX)
206
+ endif
207
+
204
208
ifeq ($(PORTNAME), beos)
205
209
shlib := lib$(NAME)$(DLSUFFIX)
206
210
LINK.shared = $(LD) -nostart
@@ -229,6 +233,7 @@ all-static-lib: lib$(NAME).a
229
233
all-shared-lib: $(shlib)
230
234
231
235
ifneq ($(PORTNAME), cygwin)
236
+ ifneq ($(PORTNAME), win32)
232
237
233
238
ifndef LORDER
234
239
MK_NO_LORDER := true
@@ -242,12 +247,14 @@ else
242
247
endif
243
248
$(RANLIB) $@
244
249
250
+ endif # not win32
245
251
endif # not cygwin
246
252
247
253
ifeq ($(enable_shared), yes)
248
254
249
255
ifneq ($(PORTNAME), beos)
250
256
ifneq ($(PORTNAME), cygwin)
257
+ ifneq ($(PORTNAME), win32)
251
258
ifneq ($(PORTNAME), aix)
252
259
253
260
# Normal case
@@ -273,6 +280,16 @@ $(shlib): lib$(NAME).a
273
280
274
281
endif # PORTNAME == aix
275
282
283
+ else # PORTNAME == win32
284
+
285
+ # win32 case
286
+ $(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
290
+
291
+ endif # PORTNAME == win32
292
+
276
293
else # PORTNAME == cygwin
277
294
278
295
# Cygwin case
@@ -316,6 +333,7 @@ ifeq ($(enable_shared), yes)
316
333
install-lib-shared: $(shlib)
317
334
$(INSTALL_SHLIB) $< $(DESTDIR)$(libdir)/$(shlib)
318
335
ifneq ($(PORTNAME), cygwin)
336
+ ifneq ($(PORTNAME), win32)
319
337
ifneq ($(shlib), lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION))
320
338
cd $(DESTDIR)$(libdir) && \
321
339
rm -f lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) && \
@@ -327,6 +345,7 @@ ifneq ($(shlib), lib$(NAME)$(DLSUFFIX))
327
345
$(LN_S) $(shlib) lib$(NAME)$(DLSUFFIX)
328
346
endif
329
347
348
+ endif # not win32
330
349
endif # not cygwin
331
350
endif # enable_shared
332
351
@@ -361,3 +380,7 @@ endif
361
380
ifeq ($(PORTNAME), cygwin)
362
381
rm -f $(NAME).dll $(NAME).def
363
382
endif
383
+
384
+ ifeq ($(PORTNAME), win32)
385
+ rm -f $(NAME).dll $(NAME).def
386
+ endif
0 commit comments