summaryrefslogtreecommitdiff
path: root/contrib/string/Makefile
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1997-11-05 21:38:25 +0000
committerBruce Momjian <bruce@momjian.us>1997-11-05 21:38:25 +0000
commit951986c550dccfdafffcf2eda30980c7310b41b4 (patch)
tree9bd4eb75a2c8cdc96e72cd5675c0a398d9c3659c /contrib/string/Makefile
parent5aaf00f3f39848eb8fef768e3ec8c0e816a87172 (diff)
downloadpostgresql-951986c550dccfdafffcf2eda30980c7310b41b4.tar.gz
Update of contrib stuff from massimo.
Diffstat (limited to 'contrib/string/Makefile')
-rw-r--r--contrib/string/Makefile62
1 files changed, 62 insertions, 0 deletions
diff --git a/contrib/string/Makefile b/contrib/string/Makefile
new file mode 100644
index 0000000000..b9ff534137
--- /dev/null
+++ b/contrib/string/Makefile
@@ -0,0 +1,62 @@
+#-------------------------------------------------------------------------
+#
+# 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)
+ cp -p $(MODULE) $(LIBDIR)
+ cd $(LIBDIR); strip $(MODULE)
+
+%.sql: %.sql.in
+ sed "s|MODULE_PATHNAME|$(LIBDIR)/$(MODULE)|" < $< > $@
+
+.SUFFIXES: $(DLSUFFIX)
+
+%$(DLSUFFIX): %.c
+ cc $(CFLAGS) -shared -o $@ $<
+
+depend dep:
+ $(CC) -MM $(INCLUDE_OPT) *.c >depend
+
+clean:
+ rm -f $(MODULE) $(MODNAME).sql
+
+ifeq (depend,$(wildcard depend))
+include depend
+endif