1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
$NetBSD: patch-src_backend_Makefile,v 1.2 2013/10/04 18:23:40 joerg Exp $
--- src/backend/Makefile.orig 2013-09-02 20:53:17.000000000 +0000
+++ src/backend/Makefile
@@ -17,6 +17,10 @@ subdir = src/backend
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
+CFLAGS+= $(DL_CFLAGS)
+LDFLAGS+= $(DL_LDFLAGS)
+LIBS+= $(DL_LIBS)
+
SUBDIRS = access bootstrap catalog parser commands executor foreign lib libpq \
main nodes optimizer port postmaster regex replication rewrite \
storage tcop tsearch utils $(top_builddir)/src/timezone
@@ -62,18 +66,8 @@ endif
ifeq ($(PORTNAME), cygwin)
-postgres: $(OBJS) postgres.def libpostgres.a
- $(DLLTOOL) --dllname $@$(X) --output-exp $@.exp --def postgres.def
- $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_EX) -o $@$(X) -Wl,--base-file,$@.base $@.exp $(call expand_subsys,$(OBJS)) $(LIBS)
- $(DLLTOOL) --dllname $@$(X) --base-file $@.base --output-exp $@.exp --def postgres.def
- $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_EX) -Wl,--stack,$(WIN32_STACK_RLIMIT) -o $@$(X) $@.exp $(call expand_subsys,$(OBJS)) $(LIBS)
- rm -f $@.exp $@.base
-
-postgres.def: $(OBJS)
- $(DLLTOOL) --export-all --output-def $@ $(call expand_subsys,$^)
-
-libpostgres.a: postgres.def
- $(DLLTOOL) --dllname postgres.exe --def postgres.def --output-lib $@
+postgres libpostgres.a: $(OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_EX) $(export_dynamic) $(call expand_subsys,$^) $(LIBS) -o $@ -Wl,--stack,$(WIN32_STACK_RLIMIT) -Wl,--export-all-symbols -Wl,--out-implib=libpostgres.a
endif # cygwin
@@ -131,6 +125,8 @@ catalog/schemapg.h: | submake-schemapg
$(top_builddir)/src/port/libpgport_srv.a: | submake-libpgport
+$(top_builddir)/src/common/libpgcommon_srv.a: | submake-libpgport
+
# The postgres.o target is needed by the rule in Makefile.global that
# creates the exports file when MAKE_EXPORTS = true.
|