pg_filedump/Makefile

40 lines
1.3 KiB
Makefile
Raw Normal View History

2011-01-18 01:33:27 +00:00
# View README.pg_filedump first
# note this must match version macros in pg_filedump.h
2016-09-29 13:24:49 +02:00
FD_VERSION=9.6.0
# If working with a PG source directory, point PGSQL_INCLUDE_DIR to its
# src/include subdirectory. If working with an installed tree, point to
# the server include subdirectory, eg /usr/local/include/postgresql/server
PG_CONFIG=pg_config
PGSQL_CFLAGS=$(shell $(PG_CONFIG) --cflags)
PGSQL_INCLUDE_DIR=$(shell $(PG_CONFIG) --includedir-server)
PGSQL_LDFLAGS=$(shell $(PG_CONFIG) --ldflags)
2016-03-24 18:57:55 +01:00
PGSQL_LIB_DIR=$(shell $(PG_CONFIG) --libdir)
PGSQL_BIN_DIR=$(shell $(PG_CONFIG) --bindir)
2011-01-18 01:33:27 +00:00
DISTFILES= README.pg_filedump Makefile Makefile.contrib \
pg_filedump.h pg_filedump.c
2011-01-18 01:33:27 +00:00
all: pg_filedump
pg_filedump: pg_filedump.o
${CC} ${PGSQL_LDFLAGS} ${LDFLAGS} -o pg_filedump pg_filedump.o -L${PGSQL_LIB_DIR} -lpgport
2011-01-18 01:33:27 +00:00
pg_filedump.o: pg_filedump.c
${CC} ${PGSQL_CFLAGS} ${CFLAGS} -I${PGSQL_INCLUDE_DIR} pg_filedump.c -c
2011-01-18 01:33:27 +00:00
dist:
rm -rf pg_filedump-${FD_VERSION} pg_filedump-${FD_VERSION}.tar.gz
mkdir pg_filedump-${FD_VERSION}
cp -p ${DISTFILES} pg_filedump-${FD_VERSION}
tar cfz pg_filedump-${FD_VERSION}.tar.gz pg_filedump-${FD_VERSION}
rm -rf pg_filedump-${FD_VERSION}
install: pg_filedump
mkdir -p $(DESTDIR)$(PGSQL_BIN_DIR)
install pg_filedump $(DESTDIR)$(PGSQL_BIN_DIR)
2011-01-18 01:33:27 +00:00
clean:
rm -f *.o pg_filedump