postgresql/src/pl/plpython/Makefile

61 lines
1.9 KiB
Makefile
Raw Normal View History

# $Header: /cvsroot/pgsql/src/pl/plpython/Makefile,v 1.4 2001/05/12 01:30:30 petere Exp $
2001-05-09 15:54:38 -04:00
subdir = src/pl/plpython
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
2001-05-09 15:54:38 -04:00
# These things ought to go into $(top_srcdir)/config/python.m4 sometime.
2001-05-09 15:54:38 -04:00
PYTHON_VERSION := $(shell $(PYTHON) -c 'import sys; print sys.version[:3]')
PYTHON_INCLUDE := $(shell $(PYTHON) -c 'import sys; print sys.prefix')/include/python$(PYTHON_VERSION)
2001-05-09 15:54:38 -04:00
override CPPFLAGS := -I$(srcdir) -I$(PYTHON_INCLUDE) $(CPPFLAGS)
2001-05-09 15:54:38 -04:00
PYTHON_LIB := $(shell $(PYTHON) -c 'import sys; print sys.exec_prefix')/lib/python$(PYTHON_VERSION)
2001-05-09 15:54:38 -04:00
NAME = plpython
SO_MAJOR_VERSION = 0
SO_MINOR_VERSION = 0
OBJS = plpython.o
2001-05-09 15:54:38 -04:00
# This static version might work on most ELF systems...
SHLIB_LINK += $(PYTHON_LIB)/config/libpython$(PYTHON_VERSION).a
# ...otherwise you need a shared version, but you need to build that yourself.
#SHLIB_LINK += -lpython$(PYTHON_VERSION)
2001-05-09 15:54:38 -04:00
# Python uses this. Should become a configure check.
SHLIB_LINK += -lpthread
2001-05-09 15:54:38 -04:00
# Python 2 seems to want libdb.
#SHLIB_LINK += -ldb2
2001-05-09 15:54:38 -04:00
# Hopefully you won't need this utter crap. But if you can't patch
# the appropriate dynloader file, try this. You may have to add other
# modules.
2001-05-09 15:54:38 -04:00
#
#DLDIR=$(PYTHON_LIB)/lib-dynload
#DLHACK=$(DLDIR)/arraymodule.so $(DLDIR)/timemodule.so $(DLDIR)/cmathmodule.so $(DLDIR)/errnomodule.so $(DLDIR)/mathmodule.so $(DLDIR)/md5module.so $(DLDIR)/operator.so $(DLDIR)/shamodule.so
#SHLIB_LINK += $(DLDIR)
include $(top_srcdir)/src/Makefile.shlib
2001-05-09 15:54:38 -04:00
all: all-lib
2001-05-09 15:54:38 -04:00
install: all installdirs
$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(libdir)/plpython$(DLSUFFIX)
2001-05-09 15:54:38 -04:00
installdirs:
$(mkinstalldirs) $(DESTDIR)$(libdir)
2001-05-09 15:54:38 -04:00
uninstall:
rm -f $(DESTDIR)$(libdir)/plpython$(DLSUFFIX)
2001-05-09 15:54:38 -04:00
clean distclean maintainer-clean: clean-lib
rm -f $(OBJS)
@rm -f error.diff feature.diff error.output feature.output test.log
2001-05-09 15:54:38 -04:00
installcheck:
PATH=$(bindir):$$PATH $(SHELL) $(srcdir)/test.sh