doc: clarify that pg_global can _only_ be used for system tabs.
[pgsql.git] / src / bin / pg_dump / Makefile
blob604cddb9972ca8c61c0a33df57fafb17affc0117
1 #-------------------------------------------------------------------------
3 # Makefile for src/bin/pg_dump
5 # Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
6 # Portions Copyright (c) 1994, Regents of the University of California
8 # src/bin/pg_dump/Makefile
10 #-------------------------------------------------------------------------
12 PGFILEDESC = "pg_dump/pg_restore/pg_dumpall - backup and restore PostgreSQL databases"
13 PGAPPICON=win32
15 subdir = src/bin/pg_dump
16 top_builddir = ../../..
17 include $(top_builddir)/src/Makefile.global
19 export GZIP_PROGRAM=$(GZIP)
20 export LZ4
21 export ZSTD
22 export with_icu
24 override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
25 LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils $(libpq_pgport)
27 OBJS = \
28 $(WIN32RES) \
29 compress_gzip.o \
30 compress_io.o \
31 compress_lz4.o \
32 compress_none.o \
33 compress_zstd.o \
34 dumputils.o \
35 parallel.o \
36 pg_backup_archiver.o \
37 pg_backup_custom.o \
38 pg_backup_db.o \
39 pg_backup_directory.o \
40 pg_backup_null.o \
41 pg_backup_tar.o \
42 pg_backup_utils.o
44 all: pg_dump pg_restore pg_dumpall
46 pg_dump: pg_dump.o common.o pg_dump_sort.o $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
47 $(CC) $(CFLAGS) pg_dump.o common.o pg_dump_sort.o $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
49 pg_restore: pg_restore.o $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
50 $(CC) $(CFLAGS) pg_restore.o $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
52 pg_dumpall: pg_dumpall.o dumputils.o $(WIN32RES) | submake-libpq submake-libpgport submake-libpgfeutils
53 $(CC) $(CFLAGS) pg_dumpall.o dumputils.o $(WIN32RES) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
55 install: all installdirs
56 $(INSTALL_PROGRAM) pg_dump$(X) '$(DESTDIR)$(bindir)'/pg_dump$(X)
57 $(INSTALL_PROGRAM) pg_restore$(X) '$(DESTDIR)$(bindir)'/pg_restore$(X)
58 $(INSTALL_PROGRAM) pg_dumpall$(X) '$(DESTDIR)$(bindir)'/pg_dumpall$(X)
60 installdirs:
61 $(MKDIR_P) '$(DESTDIR)$(bindir)'
63 check:
64 $(prove_check)
66 installcheck:
67 $(prove_installcheck)
69 uninstall:
70 rm -f $(addprefix '$(DESTDIR)$(bindir)'/, pg_dump$(X) pg_restore$(X) pg_dumpall$(X))
72 clean distclean:
73 rm -f pg_dump$(X) pg_restore$(X) pg_dumpall$(X) $(OBJS) pg_dump.o common.o pg_dump_sort.o pg_restore.o pg_dumpall.o
74 rm -rf tmp_check