Files
repmgr/Makefile
Greg Smith 942ed7b518 Add default makefile target. Document building
with PGXS.  Convert README to be a .rst file, and
make it and INSTALL valid ReST markup in advance
of merging the two.
2010-10-29 15:13:23 -04:00

37 lines
830 B
Makefile

#
# Makefile
# Copyright (c) 2ndQuadrant, 2010
repmgrd_OBJS = dbutils.o config.o repmgrd.o
repmgr_OBJS = dbutils.o check_dir.o config.o repmgr.o
PG_CPPFLAGS = -I$(libpq_srcdir)
PG_LIBS = $(libpq_pgport)
all: repmgrd repmgr
repmgrd: $(repmgrd_OBJS)
$(CC) $(CFLAGS) $(repmgrd_OBJS) $(PG_LIBS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o repmgrd
repmgr: $(repmgr_OBJS)
$(CC) $(CFLAGS) $(repmgr_OBJS) $(PG_LIBS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o repmgr
ifdef USE_PGXS
PGXS := $(shell pg_config --pgxs)
include $(PGXS)
else
subdir = contrib/repmgr
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif
install:
$(INSTALL_PROGRAM) repmgrd$(X) '$(DESTDIR)$(bindir)'
$(INSTALL_PROGRAM) repmgr$(X) '$(DESTDIR)$(bindir)'
clean:
rm -f *.o
rm -f repmgrd
rm -f repmgr