We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent6deb52b commitff68e90Copy full SHA for ff68e90
src/bin/pg_ctl/Makefile
@@ -16,12 +16,20 @@ subdir = src/bin/pg_ctl
16
top_builddir = ../../..
17
include$(top_builddir)/src/Makefile.global
18
19
+# On Windows, we need to link with libpq, just for use of pqexpbuffer;
20
+# but let's not pull that in on platforms where we don't need it.
21
+ifeq ($(PORTNAME), win32)
22
+overrideCPPFLAGS := -I$(libpq_srcdir)$(CPPFLAGS)
23
+SUBMAKE_LIBPQ := submake-libpq
24
+LIBPQ_PGPORT :=$(libpq_pgport)
25
+endif
26
+
27
OBJS=pg_ctl.o$(WIN32RES)
28
29
all: pg_ctl
30
-pg_ctl:$(OBJS) | submake-libpgport
-$(CC)$(CFLAGS)$(OBJS)$(LDFLAGS)$(LDFLAGS_EX)$(LIBS) -o$@$(X)
31
+pg_ctl:$(OBJS) | submake-libpgport$(SUBMAKE_LIBPQ)
32
+$(CC)$(CFLAGS)$(OBJS)$(LIBPQ_PGPORT)$(LDFLAGS)$(LDFLAGS_EX)$(LIBS) -o$@$(X)
33
34
install: all installdirs
35
$(INSTALL_PROGRAM) pg_ctl$(X)'$(DESTDIR)$(bindir)/pg_ctl$(X)'