1#------------------------------------------------------------------------- 2# 3# Makefile for src/bin/pg_rewind 4# 5# Portions Copyright (c) 2013-2017, PostgreSQL Global Development Group 6# 7# src/bin/pg_rewind/Makefile 8# 9#------------------------------------------------------------------------- 10 11PGFILEDESC = "pg_rewind - synchronize a data directory with another one forked from" 12PGAPPICON = win32 13 14subdir = src/bin/pg_rewind 15top_builddir = ../../.. 16include $(top_builddir)/src/Makefile.global 17 18override CPPFLAGS := -I$(libpq_srcdir) -DFRONTEND $(CPPFLAGS) 19LDFLAGS_INTERNAL += $(libpq_pgport) 20 21OBJS = pg_rewind.o parsexlog.o xlogreader.o datapagemap.o timeline.o \ 22 fetch.o file_ops.o copy_fetch.o libpq_fetch.o filemap.o logging.o \ 23 $(WIN32RES) 24 25EXTRA_CLEAN = xlogreader.c 26 27all: pg_rewind 28 29pg_rewind: $(OBJS) | submake-libpq submake-libpgport 30 $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X) 31 32xlogreader.c: % : $(top_srcdir)/src/backend/access/transam/% 33 rm -f $@ && $(LN_S) $< . 34 35install: all installdirs 36 $(INSTALL_PROGRAM) pg_rewind$(X) '$(DESTDIR)$(bindir)/pg_rewind$(X)' 37 38installdirs: 39 $(MKDIR_P) '$(DESTDIR)$(bindir)' 40 41uninstall: 42 rm -f '$(DESTDIR)$(bindir)/pg_rewind$(X)' 43 44clean distclean maintainer-clean: 45 rm -f pg_rewind$(X) $(OBJS) xlogreader.c 46 rm -rf tmp_check 47 48check: 49 $(prove_check) 50 51installcheck: 52 $(prove_installcheck) 53