File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -16,12 +16,20 @@ subdir = src/bin/pg_ctl
16
16
top_builddir = ../../..
17
17
include $(top_builddir ) /src/Makefile.global
18
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
+ override CPPFLAGS := -I$(libpq_srcdir ) $(CPPFLAGS )
23
+ SUBMAKE_LIBPQ := submake-libpq
24
+ LIBPQ_PGPORT := $(libpq_pgport )
25
+ endif
26
+
19
27
OBJS = pg_ctl.o $(WIN32RES )
20
28
21
29
all : pg_ctl
22
30
23
- pg_ctl : $(OBJS ) | submake-libpgport
24
- $(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 )
25
33
26
34
install : all installdirs
27
35
$(INSTALL_PROGRAM ) pg_ctl$(X ) ' $(DESTDIR)$(bindir)/pg_ctl$(X)'
You can’t perform that action at this time.
0 commit comments