postgresql/contrib/rserv/Makefile
Peter Eisentraut 337da0678a Assorted fixes for Cygwin:
Eliminate the mysterious games that the Cygwin build plays with the linker
flag variables.  DLLLIBS is gone, use SHLIB_LINK like everyone else.
Detect cygipc in configure, after the linker flags are set up, otherwise
configure might not work at all.

Make sure everything is covered by make clean.

Fix the build of the new conversion procedure modules.

Add new DLLIMPORT markers where required.

Finally, the compiler complains if we use an explicit
-I/usr/local/include, so don't do that.  Curiously, -L/usr/local/lib is
still necessary.
2002-09-05 18:28:46 +00:00

53 lines
1.5 KiB
Makefile

# Makefile for erServer demonstration implementation
# (c) 2000 Vadim Mikheev, PostgreSQL Inc.
subdir = contrib/rserv
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
NAME = rserv
SONAME = $(NAME)$(DLSUFFIX)
SQLS = master.sql slave.sql
TCLS = RservTest
PERLS = MasterInit MasterAddTable Replicate MasterSync CleanLog
PERLS += SlaveInit SlaveAddTable GetSyncID
PERLS += PrepareSnapshot ApplySnapshot
SCRIPTS = InitRservTest
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
SHLIB_LINK = $(BE_DLLLIBS)
all: $(SQLS) $(TCLS) $(PERLS) $(SCRIPTS) $(SONAME)
%.sql: %.sql.in
sed 's,@MODULE_FILENAME@,$$libdir/$(NAME),g' $< >$@
$(PERLS) $(TCLS) $(SCRIPTS): %: %.in
sed -e 's,@MODULE_FILENAME@,$$libdir/$(NAME),g' \
-e 's:@SQLDIR@:$(datadir)/contrib:g' \
-e 's:@BINDIR@:$(bindir):g' \
-e 's:@LIBDIR@:$(datadir)/contrib:g' $< >$@
chmod a+x $@
install: all installdirs
for file in $(SQLS); do \
$(INSTALL_DATA) $$file $(DESTDIR)$(datadir)/contrib || exit ; \
done
for file in $(TCLS) $(PERLS) $(SCRIPTS); do \
$(INSTALL_SCRIPT) $$file $(DESTDIR)$(bindir) || exit ; \
done
$(INSTALL_DATA) $(srcdir)/RServ.pm $(DESTDIR)$(datadir)/contrib
$(INSTALL_SHLIB) $(SONAME) $(DESTDIR)$(pkglibdir)
$(INSTALL_DATA) $(srcdir)/README.$(NAME) $(DESTDIR)$(docdir)/contrib
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)/contrib \
$(DESTDIR)$(pkglibdir) $(DESTDIR)$(docdir)/contrib
clean distclean maintainer-clean:
rm -f $(SQLS) $(TCLS) $(PERLS) $(SCRIPTS) $(SONAME) $(NAME).o