postgresql/contrib/spi/Makefile

58 lines
1.4 KiB
Makefile
Raw Normal View History

2000-06-15 20:55:34 +02:00
#
# $Header: /cvsroot/pgsql/contrib/spi/Makefile,v 1.20 2001/04/04 21:15:56 tgl Exp $
2000-06-15 20:55:34 +02:00
#
subdir = contrib/spi
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
2000-06-15 20:55:34 +02:00
OBJS = autoinc.o insert_username.o moddatetime.o refint.o timetravel.o
2000-06-19 15:54:50 +02:00
DOCS = README.spi
2000-06-15 20:55:34 +02:00
SQLS = $(OBJS:.o=.sql)
EXAMPLES= $(OBJS:.o=.example)
2000-06-15 20:55:34 +02:00
MODS = $(OBJS:.o=$(DLSUFFIX))
override CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
override CFLAGS += $(CFLAGS_SL)
1997-09-11 11:08:31 +02:00
ifdef REFINT_VERBOSE
override CPPFLAGS+= -DREFINT_VERBOSE
1997-09-11 11:08:31 +02:00
endif
override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS)
2000-06-15 20:55:34 +02:00
all: $(MODS) $(SQLS)
%.sql: %.sql.in
sed -e 's:MODULE_PATHNAME:$(libdir)/contrib/$(@:.sql=$(DLSUFFIX)):g' < $< > $@
2000-06-15 20:55:34 +02:00
install: all installdirs
2000-06-15 20:55:34 +02:00
for inst_file in $(SQLS); do \
$(INSTALL_DATA) $$inst_file $(datadir)/contrib || exit; \
2000-06-15 20:55:34 +02:00
done
for inst_file in $(MODS); do \
$(INSTALL_SHLIB) $$inst_file $(libdir)/contrib || exit; \
2000-06-15 20:55:34 +02:00
done
for inst_file in $(EXAMPLES) README.spi; do \
$(INSTALL_DATA) $$inst_file $(docdir)/contrib/spi || exit; \
2000-06-15 20:55:34 +02:00
done
installdirs:
$(mkinstalldirs) $(datadir)/contrib $(libdir)/contrib $(docdir)/contrib/spi
uninstall:
rm -f $(addprefix $(datadir)/contrib/, $(SQLS)) \
$(addprefix $(libdir)/contrib/, $(MODS)) \
$(addprefix $(docdir)/contrib/spi/, $(EXAMPLES) README.spi)
clean distclean maintainer-clean:
rm -f $(MODS) $(SQLS) $(OBJS)
2000-06-15 20:55:34 +02:00
depend dep:
$(CC) -MM -MG $(CFLAGS) *.c > depend
2000-06-15 20:55:34 +02:00
ifeq (depend,$(wildcard depend))
include depend
endif