postgresql/contrib/spi/Makefile

65 lines
1.3 KiB
Makefile
Raw Normal View History

2000-06-15 20:55:34 +02:00
#
2000-07-04 18:17:21 +02:00
# $Header: /cvsroot/pgsql/contrib/spi/Makefile,v 1.16 2000/07/04 16:17:11 momjian Exp $
2000-06-15 20:55:34 +02:00
#
2000-06-15 20:55:34 +02:00
TOPDIR=../..
2000-06-15 20:55:34 +02:00
include ../Makefile.global
2000-06-19 15:54:50 +02:00
NAME =
2000-06-15 20:55:34 +02:00
PROGRAM =
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)
BINS =
2000-06-19 15:54:50 +02:00
EXAMPLES= $(OBJS:.o=.example) new_example.example
2000-06-15 20:55:34 +02:00
MODS = $(OBJS:.o=$(DLSUFFIX))
CFLAGS += -I. $(CFLAGS_SL)
1997-09-11 11:08:31 +02:00
ifdef REFINT_VERBOSE
CFLAGS+= -DREFINT_VERBOSE
endif
2000-06-15 20:55:34 +02:00
OTHER_CLEAN = $(SQLS)
all: $(MODS) $(SQLS)
%.sql: %.sql.in
2000-07-04 18:17:21 +02:00
$(SED) "s|MODULE_PATHNAME|$(CONTRIB_MODDIR)/$(@:.sql=$(DLSUFFIX))|" < $< > $@
2000-06-15 20:55:34 +02:00
install: install_doc install_sql install_mod install_example
install_doc:
for inst_file in $(DOCS); do \
2000-06-19 15:54:50 +02:00
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_DOCDIR); \
2000-06-15 20:55:34 +02:00
done
2000-06-15 20:55:34 +02:00
install_sql:
for inst_file in $(SQLS); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_SQLDIR); \
done
2000-06-15 20:55:34 +02:00
install_mod:
for inst_file in $(MODS); do \
$(INSTALL) $(INSTL_SHLIB_OPTS) $$inst_file $(CONTRIB_MODDIR); \
done
2000-06-15 20:55:34 +02:00
install_example:
for inst_file in $(EXAMPLES); do \
$(INSTALL) $(INSTL_LIB_OPTS) $$inst_file $(CONTRIB_EXAMPLESDIR); \
done
depend dep:
$(CC) -MM -MG $(CFLAGS) *.c > depend
clean:
2000-06-15 20:55:34 +02:00
$(RM) *~ $(OBJS) $(MODS) $(PROGRAM) depend $(OTHER_CLEAN) core log
ifeq (depend,$(wildcard depend))
include depend
endif