Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. # $Id$
  2. #
  3. #
  4. # WARNING: do not run this directly, it should be run by the master Makefile
  5. include ../../Makefile.defs
  6. auto_gen=
  7. NAME=app_python.so
  8. # If you have multiple Python versions installed make sure to modify the
  9. # the following to point to the correct instance. Module has been tested
  10. # to work with 2.6 and 2.5. Python 2.4 has been only confirmed to compile,
  11. # but no testing has been done with that.
  12. PYTHON?=python
  13. PYTHON_VERSION=${shell ${PYTHON} -c "import distutils.sysconfig;print distutils.sysconfig.get_config_var('VERSION')"}
  14. PYTHON_LIBDIR=${shell ${PYTHON} -c "import distutils.sysconfig;print distutils.sysconfig.get_config_var('LIBDIR')"}
  15. PYTHON_LDFLAGS=${shell ${PYTHON} -c "import distutils.sysconfig;print distutils.sysconfig.get_config_var('LINKFORSHARED')"}
  16. PYTHON_INCDIR=${shell ${PYTHON} -c "import distutils.sysconfig;print distutils.sysconfig.get_python_inc()"}
  17. LIBS=-L${PYTHON_LIBDIR} ${PYTHON_LDFLAGS} -lpython${PYTHON_VERSION}
  18. ifeq ($(OS), freebsd)
  19. LIBS+=-pthread
  20. endif
  21. DEFS+=-I${PYTHON_INCDIR}
  22. DEFS+=-DOPENSER_MOD_INTERFACE
  23. include ../../Makefile.modules