mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-08-04 02:08:49 -04:00
46 lines
1.8 KiB
Plaintext
46 lines
1.8 KiB
Plaintext
$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.
|