1997-09-11 14:51:23 +08:00
|
|
|
|
1997-09-11 17:08:31 +08:00
|
|
|
SRCDIR= ../../src
|
1997-09-11 14:51:23 +08:00
|
|
|
|
|
|
|
include $(SRCDIR)/Makefile.global
|
|
|
|
|
From: Jun Kuwamura <juk@rccm.co.jp>
This patch fix the Makefiles in contrib/{pginterface, spi,
miscutil, int8, ip_and_mac, sequence, soundex, string, userlock,
array, datetime} to install their modules in one directory(lib/modules/).
1998-04-22 12:16:46 +08:00
|
|
|
CONTRIBDIR=$(LIBDIR)/modules
|
1997-10-17 17:55:34 +08:00
|
|
|
|
1997-09-11 17:08:31 +08:00
|
|
|
CFLAGS+= $(CFLAGS_SL) -I$(SRCDIR)/include
|
|
|
|
|
|
|
|
ifdef REFINT_VERBOSE
|
|
|
|
CFLAGS+= -DREFINT_VERBOSE
|
|
|
|
endif
|
1997-09-11 14:51:23 +08:00
|
|
|
|
1997-10-03 02:01:57 +08:00
|
|
|
TARGETS= refint$(DLSUFFIX) refint.sql timetravel$(DLSUFFIX) timetravel.sql \
|
1997-10-17 17:55:34 +08:00
|
|
|
autoinc$(DLSUFFIX) autoinc.sql \
|
|
|
|
insert_username$(DLSUFFIX) insert_username.sql
|
1997-09-11 14:51:23 +08:00
|
|
|
|
|
|
|
CLEANFILES+= $(TARGETS)
|
|
|
|
|
|
|
|
all:: $(TARGETS)
|
|
|
|
|
1997-10-17 17:55:34 +08:00
|
|
|
install:: all $(CONTRIBDIR)
|
|
|
|
$(INSTALL) -c README $(CONTRIBDIR)/README.spi
|
|
|
|
for f in *.example *.sql *$(DLSUFFIX); do $(INSTALL) -c $$f $(CONTRIBDIR)/$$f; done
|
|
|
|
|
|
|
|
$(CONTRIBDIR):
|
|
|
|
mkdir -p $(CONTRIBDIR)
|
|
|
|
|
1997-09-11 14:51:23 +08:00
|
|
|
%.sql: %.source
|
|
|
|
rm -f $@; \
|
|
|
|
C=`pwd`; \
|
1997-10-17 17:55:34 +08:00
|
|
|
sed -e "s:_OBJWD_:$(CONTRIBDIR):g" \
|
1997-09-11 14:51:23 +08:00
|
|
|
-e "s:_DLSUFFIX_:$(DLSUFFIX):g" < $< > $@
|
|
|
|
|
|
|
|
clean:
|
1998-01-18 07:39:35 +08:00
|
|
|
rm -f $(TARGETS) *.o
|