1997-11-06 05:38:25 +08:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Makefile--
|
|
|
|
# Makefile for new string I/O functions.
|
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
PGDIR = ../..
|
|
|
|
SRCDIR = $(PGDIR)/src
|
|
|
|
|
|
|
|
include $(SRCDIR)/Makefile.global
|
|
|
|
|
|
|
|
INCLUDE_OPT = -I ./ \
|
|
|
|
-I $(SRCDIR)/ \
|
|
|
|
-I $(SRCDIR)/include \
|
|
|
|
-I $(SRCDIR)/port/$(PORTNAME)
|
|
|
|
|
|
|
|
CFLAGS += $(INCLUDE_OPT)
|
|
|
|
|
|
|
|
ifeq ($(PORTNAME), linux)
|
|
|
|
ifdef LINUX_ELF
|
|
|
|
ifeq ($(CC), gcc)
|
|
|
|
CFLAGS += -fPIC
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(PORTNAME), i386_solaris)
|
|
|
|
CFLAGS+= -fPIC
|
|
|
|
endif
|
|
|
|
|
|
|
|
MODNAME = string_io
|
|
|
|
|
|
|
|
MODULE = $(MODNAME)$(DLSUFFIX)
|
|
|
|
|
|
|
|
all: module sql
|
|
|
|
|
|
|
|
module: $(MODULE)
|
|
|
|
|
|
|
|
sql: $(MODNAME).sql
|
|
|
|
|
|
|
|
install: $(MODULE)
|
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
|
|
|
cp -p $(MODULE) $(LIBDIR)/modules
|
|
|
|
cd $(LIBDIR)/modules; strip $(MODULE)
|
1997-11-06 05:38:25 +08:00
|
|
|
|
|
|
|
%.sql: %.sql.in
|
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
|
|
|
sed "s|MODULE_PATHNAME|$(LIBDIR)/modules/$(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:
|
|
|
|
rm -f $(MODULE) $(MODNAME).sql
|
|
|
|
|
|
|
|
ifeq (depend,$(wildcard depend))
|
|
|
|
include depend
|
|
|
|
endif
|