2008-12-08 04:32:10 +00:00
|
|
|
#
|
2012-11-10 22:33:57 +00:00
|
|
|
# pg_repack: bin/Makefile
|
2008-12-08 04:32:10 +00:00
|
|
|
#
|
2012-09-20 15:36:47 +00:00
|
|
|
# Portions Copyright (c) 2008-2012, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
|
2011-04-29 05:06:48 +00:00
|
|
|
# Portions Copyright (c) 2011, Itagaki Takahiro
|
2015-01-11 19:01:37 -05:00
|
|
|
# Portions Copyright (c) 2012-2015, The Reorg Development Team
|
2008-12-08 04:32:10 +00:00
|
|
|
#
|
2013-04-18 00:29:23 +01:00
|
|
|
|
|
|
|
PG_CONFIG ?= pg_config
|
|
|
|
|
2012-11-10 22:33:57 +00:00
|
|
|
SRCS = pg_repack.c pgut/pgut.c pgut/pgut-fe.c
|
2009-04-22 07:26:12 +00:00
|
|
|
OBJS = $(SRCS:.c=.o)
|
2012-11-10 22:33:57 +00:00
|
|
|
PROGRAM = pg_repack
|
2008-12-08 04:32:10 +00:00
|
|
|
|
2013-04-18 00:34:44 +01:00
|
|
|
|
2012-11-11 18:30:27 +00:00
|
|
|
# The version number of the program. It should be the same of the library.
|
|
|
|
REPACK_VERSION = $(shell grep '"version":' ../META.json | head -1 \
|
2012-11-16 10:36:16 +00:00
|
|
|
| sed -e 's/[ ]*"version":[ ]*"\(.*\)",/\1/')
|
2012-11-11 18:30:27 +00:00
|
|
|
|
|
|
|
PG_CPPFLAGS = -I$(libpq_srcdir) -DREPACK_VERSION=$(REPACK_VERSION)
|
|
|
|
|
|
|
|
ifdef DEBUG_REPACK
|
|
|
|
PG_CPPFLAGS += -DDEBUG_REPACK
|
2008-12-08 04:32:10 +00:00
|
|
|
endif
|
2012-11-11 18:30:27 +00:00
|
|
|
|
2008-12-08 04:32:10 +00:00
|
|
|
PG_LIBS = $(libpq)
|
|
|
|
|
2018-05-19 17:08:13 +01:00
|
|
|
# libs pgport, pgcommon moved somewhere else in some ubuntu version
|
|
|
|
# see ticket #179
|
|
|
|
PG_LIBS += -L$(shell $(PG_CONFIG) --pkglibdir)
|
|
|
|
|
2011-01-06 09:35:15 +00:00
|
|
|
USE_PGXS = 1 # use pgxs if not in contrib directory
|
|
|
|
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
2008-12-08 04:32:10 +00:00
|
|
|
include $(PGXS)
|
2010-06-01 07:35:01 +00:00
|
|
|
|
2013-05-23 20:31:56 -04:00
|
|
|
# remove dependency on libxml2, libxslt, and libpam.
|
|
|
|
# XXX: find a better way to make sure we are linking with libraries
|
|
|
|
# from pg_config which we actually need.
|
2017-03-23 18:47:39 +00:00
|
|
|
LIBS := $(filter-out -ledit -lgssapi_krb5 -lpam -lselinux -lxml2 -lxslt, $(LIBS))
|