1 #-------------------------------------------------------------------------
3 # Makefile for src/bin/pg_basebackup
5 # Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
6 # Portions Copyright (c) 1994, Regents of the University of California
8 # src/bin/pg_basebackup/Makefile
10 #-------------------------------------------------------------------------
12 PGFILEDESC
= "pg_basebackup/pg_receivewal/pg_recvlogical - streaming WAL and backup receivers"
15 EXTRA_INSTALL
=contrib
/test_decoding
17 subdir
= src
/bin
/pg_basebackup
18 top_builddir
= ..
/..
/..
19 include $(top_builddir
)/src
/Makefile.global
21 # make these available to TAP test scripts
23 # Note that GZIP cannot be used directly as this environment variable is
24 # used by the command "gzip" to pass down options, so stick with a different
26 export GZIP_PROGRAM
=$(GZIP
)
28 override CPPFLAGS
:= -I
$(libpq_srcdir
) $(CPPFLAGS
)
29 LDFLAGS_INTERNAL
+= -L
$(top_builddir
)/src
/fe_utils
-lpgfeutils
$(libpq_pgport
)
37 all: pg_basebackup pg_receivewal pg_recvlogical
39 pg_basebackup
: pg_basebackup.o
$(OBJS
) | submake-libpq submake-libpgport submake-libpgfeutils
40 $(CC
) $(CFLAGS
) pg_basebackup.o
$(OBJS
) $(LDFLAGS
) $(LDFLAGS_EX
) $(LIBS
) -o
$@
$(X
)
42 pg_receivewal
: pg_receivewal.o
$(OBJS
) | submake-libpq submake-libpgport submake-libpgfeutils
43 $(CC
) $(CFLAGS
) pg_receivewal.o
$(OBJS
) $(LDFLAGS
) $(LDFLAGS_EX
) $(LIBS
) -o
$@
$(X
)
45 pg_recvlogical
: pg_recvlogical.o
$(OBJS
) | submake-libpq submake-libpgport submake-libpgfeutils
46 $(CC
) $(CFLAGS
) pg_recvlogical.o
$(OBJS
) $(LDFLAGS
) $(LDFLAGS_EX
) $(LIBS
) -o
$@
$(X
)
48 install: all installdirs
49 $(INSTALL_PROGRAM
) pg_basebackup
$(X
) '$(DESTDIR)$(bindir)/pg_basebackup$(X)'
50 $(INSTALL_PROGRAM
) pg_receivewal
$(X
) '$(DESTDIR)$(bindir)/pg_receivewal$(X)'
51 $(INSTALL_PROGRAM
) pg_recvlogical
$(X
) '$(DESTDIR)$(bindir)/pg_recvlogical$(X)'
54 $(MKDIR_P
) '$(DESTDIR)$(bindir)'
57 rm -f
'$(DESTDIR)$(bindir)/pg_basebackup$(X)'
58 rm -f
'$(DESTDIR)$(bindir)/pg_receivewal$(X)'
59 rm -f
'$(DESTDIR)$(bindir)/pg_recvlogical$(X)'
61 clean distclean maintainer-clean
:
62 rm -f pg_basebackup
$(X
) pg_receivewal
$(X
) pg_recvlogical
$(X
) \
63 pg_basebackup.o pg_receivewal.o pg_recvlogical.o \