aboutsummaryrefslogtreecommitdiff
path: root/ports/libpq/Makefile
diff options
context:
space:
mode:
authorLong Nguyen <nguyen.long.908132@gmail.com>2021-04-20 07:19:44 +0700
committerGitHub <noreply@github.com>2021-04-19 17:19:44 -0700
commit818cf25415aa0ee7f45d40d11d0b3b8e87bc0ac2 (patch)
tree179668762d7bc6d86f3a3a28f1501b45dcbebf0d /ports/libpq/Makefile
parent8f54f09957b3a6f1feaa6a2754f7180f6cff518d (diff)
downloadvcpkg-818cf25415aa0ee7f45d40d11d0b3b8e87bc0ac2.tar.gz
vcpkg-818cf25415aa0ee7f45d40d11d0b3b8e87bc0ac2.zip
[libpq] mingw support (#16740)
* [libpq] mingw support * [libpq] Let libpq decides whether to build _shlib or not libpqcommon.a and libpqport.a are internal libraries intended for sharing code between the frontend and the backend. It's best to let the build system decides if the _shlib variant should be built or not * [libpq] Always run install-lib-static on mingw * [libpq] Rename .a to .dll.a and move .dll to correct folder * [libpq] Create bin folder for mingw * [vcpkg baseline] Update libpq * [libpq] Link with crypt32 on mingw * [vcpkg baseline] Update libpq * [libpq] Fix release/debug only build * [vcpkg baseline] Update libpq
Diffstat (limited to 'ports/libpq/Makefile')
-rw-r--r--ports/libpq/Makefile17
1 files changed, 10 insertions, 7 deletions
diff --git a/ports/libpq/Makefile b/ports/libpq/Makefile
index 4832b503b..ee2ffcaf1 100644
--- a/ports/libpq/Makefile
+++ b/ports/libpq/Makefile
@@ -4,19 +4,22 @@ include src/Makefile.global
.NOTPARALLEL:
-ifeq ($(LIBPQ_LIBRARY_TYPE), shared)
-LIBPQ_LIB_SUFFIX = _shlib
-endif
-
ifeq ($(LIBPQ_LIBRARY_TYPE), static)
LIBPQ_INSTALL_LIBS = install-stlib
endif
+ifeq ($(LIBPQ_LIBRARY_TYPE), shared)
+ifeq ($(USING_MINGW), yes)
+# The import library name is the same as the static library name
+EXTRA_TARGET = install-lib-static
+endif
+endif
+
.PHONY: all
all:
$(MAKE) -C src/include MAKELEVEL=0
- $(MAKE) -C src/common MAKELEVEL=0 libpgcommon$(LIBPQ_LIB_SUFFIX).a
- $(MAKE) -C src/port MAKELEVEL=0 libpgport$(LIBPQ_LIB_SUFFIX).a
+ $(MAKE) -C src/common MAKELEVEL=0
+ $(MAKE) -C src/port MAKELEVEL=0
$(MAKE) -C src/interfaces/libpq MAKELEVEL=0 all-$(LIBPQ_LIBRARY_TYPE)-lib
$(MAKE) -C src/bin/pg_config MAKELEVEL=0
@@ -30,5 +33,5 @@ install-stlib:
.PHONY: install
install: $(LIBPQ_INSTALL_LIBS)
$(MAKE) -C src/include MAKELEVEL=0 install
- $(MAKE) -C src/interfaces/libpq MAKELEVEL=0 install-lib-$(LIBPQ_LIBRARY_TYPE) install-lib-pc install -o all -o install-lib
+ $(MAKE) -C src/interfaces/libpq MAKELEVEL=0 $(EXTRA_TARGET) install-lib-$(LIBPQ_LIBRARY_TYPE) install-lib-pc install -o all -o install-lib
$(MAKE) -C src/bin/pg_config MAKELEVEL=0 install