1997-11-06 05:38:25 +08:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
1998-08-31 03:37:51 +08:00
|
|
|
# Makefile --
|
1999-06-06 03:09:48 +08:00
|
|
|
#
|
1998-08-31 03:37:51 +08:00
|
|
|
# Makefile for string I/O module.
|
1997-11-06 05:38:25 +08:00
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
PGDIR = ../..
|
|
|
|
SRCDIR = $(PGDIR)/src
|
|
|
|
|
|
|
|
include $(SRCDIR)/Makefile.global
|
|
|
|
|
|
|
|
INCLUDE_OPT = -I ./ \
|
|
|
|
-I $(SRCDIR)/ \
|
|
|
|
-I $(SRCDIR)/include \
|
|
|
|
-I $(SRCDIR)/port/$(PORTNAME)
|
|
|
|
|
1998-08-31 03:37:51 +08:00
|
|
|
CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL)
|
1997-11-06 05:38:25 +08:00
|
|
|
|
|
|
|
MODNAME = string_io
|
|
|
|
|
1999-06-06 03:09:48 +08:00
|
|
|
SQLDEFS = $(MODNAME).sql
|
|
|
|
|
1997-11-06 05:38:25 +08:00
|
|
|
MODULE = $(MODNAME)$(DLSUFFIX)
|
|
|
|
|
1998-08-31 03:37:51 +08:00
|
|
|
MODDIR = $(LIBDIR)/modules
|
|
|
|
|
|
|
|
SQLDIR = $(LIBDIR)/sql
|
|
|
|
|
1997-11-06 05:38:25 +08:00
|
|
|
all: module sql
|
|
|
|
|
|
|
|
module: $(MODULE)
|
|
|
|
|
1999-06-06 03:09:48 +08:00
|
|
|
sql: $(SQLDEFS)
|
1997-11-06 05:38:25 +08:00
|
|
|
|
1999-06-06 03:09:48 +08:00
|
|
|
install: $(MODULE) $(SQLDEFS) $(MODDIR) $(SQLDIR)
|
1998-08-31 03:37:51 +08:00
|
|
|
cp -p $(MODULE) $(MODDIR)/
|
|
|
|
strip $(MODDIR)/$(MODULE)
|
1999-06-06 03:09:48 +08:00
|
|
|
cp -p $(SQLDEFS) $(SQLDIR)/
|
1998-08-31 03:37:51 +08:00
|
|
|
|
|
|
|
$(MODDIR):
|
|
|
|
mkdir -p $@
|
|
|
|
|
|
|
|
$(SQLDIR):
|
|
|
|
mkdir -p $@
|
1997-11-06 05:38:25 +08:00
|
|
|
|
|
|
|
%.sql: %.sql.in
|
1998-08-31 03:37:51 +08:00
|
|
|
sed "s|MODULE_PATHNAME|$(MODDIR)/$(MODULE)|" < $< > $@
|
1997-11-06 05:38:25 +08:00
|
|
|
|
|
|
|
.SUFFIXES: $(DLSUFFIX)
|
|
|
|
|
|
|
|
%$(DLSUFFIX): %.c
|
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
|
|
|
$(CC) $(CFLAGS) -shared -o $@ $<
|
1997-11-06 05:38:25 +08:00
|
|
|
|
|
|
|
depend dep:
|
|
|
|
$(CC) -MM $(INCLUDE_OPT) *.c >depend
|
|
|
|
|
|
|
|
clean:
|
1998-08-31 03:37:51 +08:00
|
|
|
rm -f *~ $(MODULE) $(MODNAME).sql
|
1997-11-06 05:38:25 +08:00
|
|
|
|
|
|
|
ifeq (depend,$(wildcard depend))
|
|
|
|
include depend
|
|
|
|
endif
|