]> granicus.if.org Git - postgresql/blob - contrib/ltree_plpython/Makefile
Prevent accidental linking of system-supplied copies of libpq.so etc.
[postgresql] / contrib / ltree_plpython / Makefile
1 # contrib/ltree_plpython/Makefile
2
3 MODULE_big = ltree_plpython$(python_majorversion)
4 OBJS = ltree_plpython.o $(WIN32RES)
5 PGFILEDESC = "ltree_plpython - ltree transform for plpython"
6
7 PG_CPPFLAGS = -I$(top_srcdir)/src/pl/plpython $(python_includespec) -I$(top_srcdir)/contrib/ltree -DPLPYTHON_LIBNAME='"plpython$(python_majorversion)"'
8
9 EXTENSION = ltree_plpythonu ltree_plpython2u ltree_plpython3u
10 DATA = ltree_plpythonu--1.0.sql ltree_plpython2u--1.0.sql ltree_plpython3u--1.0.sql
11
12 REGRESS = ltree_plpython
13 REGRESS_PLPYTHON3_MANGLE := $(REGRESS)
14
15 ifdef USE_PGXS
16 PG_CONFIG = pg_config
17 PGXS := $(shell $(PG_CONFIG) --pgxs)
18 include $(PGXS)
19 else
20 subdir = contrib/ltree_plpython
21 top_builddir = ../..
22 include $(top_builddir)/src/Makefile.global
23 include $(top_srcdir)/contrib/contrib-global.mk
24 endif
25
26 # We must link libpython explicitly
27 ifeq ($(PORTNAME), win32)
28 # ... see silliness in plpython Makefile ...
29 SHLIB_LINK_INTERNAL += $(sort $(wildcard ../../src/pl/plpython/libpython*.a))
30 else
31 rpathdir = $(python_libdir)
32 SHLIB_LINK += $(python_libspec) $(python_additional_libs)
33 endif
34
35 REGRESS_OPTS += --load-extension=ltree
36 ifeq ($(python_majorversion),2)
37 REGRESS_OPTS += --load-extension=plpythonu --load-extension=ltree_plpythonu
38 endif
39 EXTRA_INSTALL += contrib/ltree
40
41 include $(top_srcdir)/src/pl/plpython/regress-python3-mangle.mk