1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-11-24 08:52:38 +02:00
pg_probackup/Makefile

95 lines
2.6 KiB
Makefile
Raw Normal View History

2016-11-16 19:34:21 +02:00
PROGRAM = pg_probackup
OBJS = backup.o \
catalog.o \
configure.o \
data.o \
delete.o \
dir.o \
fetch.o \
2017-05-05 12:14:46 +02:00
help.o \
init.o \
2016-11-16 19:34:21 +02:00
pg_probackup.o \
restore.o \
show.o \
status.o \
util.o \
validate.o \
datapagemap.o \
parsexlog.o \
xlogreader.o \
streamutil.o \
receivelog.o \
2017-04-26 16:00:06 +02:00
utils/parray.o \
utils/pgut.o \
utils/logger.o
EXTRA_CLEAN = datapagemap.c datapagemap.h xlogreader.c receivelog.c receivelog.h streamutil.c streamutil.h logging.h
2016-11-16 19:34:21 +02:00
all: checksrcdir datapagemap.h logging.h receivelog.h streamutil.h pg_probackup
2016-09-13 14:22:34 +02:00
MAKE_GLOBAL="../../src/Makefile.global"
TEST_GLOBAL:=$(shell test -e ../../src/Makefile.global)
ifeq ($(.SHELLSTATUS),1)
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
.PHONY: checksrcdir
checksrcdir:
ifndef top_srcdir
@echo "You must have PostgreSQL source tree available to compile."
@echo "Pass the path to the PostgreSQL source tree to make, in the top_srcdir"
@echo "variable: \"make top_srcdir=<path to PostgreSQL source tree>\""
@exit 1
endif
else
2016-09-13 17:57:31 +02:00
#TODO: fix me
REGRESS =
2016-11-16 19:34:21 +02:00
subdir=contrib/pg_probackup
2016-09-13 14:22:34 +02:00
top_builddir=../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif
PG_CPPFLAGS = -I$(libpq_srcdir) ${PTHREAD_CFLAGS}
override CPPFLAGS := -DFRONTEND $(CPPFLAGS) $(PG_CPPFLAGS)
PG_LIBS = $(libpq_pgport) ${PTHREAD_CFLAGS}
2016-12-08 13:57:28 +02:00
ifeq ($(PORTNAME), aix)
CC=xlc_r
endif
2016-09-13 16:26:15 +02:00
envtest:
: top_srcdir=$(top_srcdir)
: libpq_srcdir = $(libpq_srcdir)
# This rule's only purpose is to give the user instructions on how to pass
# the path to PostgreSQL source tree to the makefile.
.PHONY: checksrcdir
checksrcdir:
ifndef top_srcdir
@echo "You must have PostgreSQL source tree available to compile."
@echo "Pass the path to the PostgreSQL source tree to make, in the top_srcdir"
@echo "variable: \"make top_srcdir=<path to PostgreSQL source tree>\""
@exit 1
endif
# Those files are symlinked from the PostgreSQL sources.
xlogreader.c: % : $(top_srcdir)/src/backend/access/transam/%
rm -f $@ && $(LN_S) $< .
datapagemap.c: % : $(top_srcdir)/src/bin/pg_rewind/%
rm -f $@ && $(LN_S) $< .
datapagemap.h: % : $(top_srcdir)/src/bin/pg_rewind/%
rm -f && $(LN_S) $< .
2016-08-30 16:21:02 +02:00
#logging.c: % : $(top_srcdir)/src/bin/pg_rewind/%
# rm -f && $(LN_S) $< .
logging.h: % : $(top_srcdir)/src/bin/pg_rewind/%
rm -f && $(LN_S) $< .
2016-04-26 14:24:59 +02:00
receivelog.c: % : $(top_srcdir)/src/bin/pg_basebackup/%
rm -f && $(LN_S) $< .
receivelog.h: % : $(top_srcdir)/src/bin/pg_basebackup/%
rm -f && $(LN_S) $< .
streamutil.c: % : $(top_srcdir)/src/bin/pg_basebackup/%
rm -f && $(LN_S) $< .
streamutil.h: % : $(top_srcdir)/src/bin/pg_basebackup/%
rm -f && $(LN_S) $< .