Always create shared python library, if python is created, needed by multiple packages
authorUlf Samuelsson <ulf.samuelsson@atmel.com>
Thu, 15 Jan 2009 06:28:05 +0000 (06:28 -0000)
committerUlf Samuelsson <ulf.samuelsson@atmel.com>
Thu, 15 Jan 2009 06:28:05 +0000 (06:28 -0000)
package/python/python.mk

index ff3b1ca7da64b31483acec03dd66bac09cab4cd8..9bbab35036a7f4a377405d9753193f0ab98b8b14 100644 (file)
@@ -106,6 +106,7 @@ $(PYTHON_DIR)/.configured: $(PYTHON_DIR)/.hostpython
                --prefix=/usr \
                --sysconfdir=/etc \
                --with-cxx=no \
+               --enable-shared \
                $(DISABLE_IPV6) \
                $(DISABLE_NLS) \
        )
@@ -166,7 +167,17 @@ ifneq ($(BR2_PACKAGE_PYTHON_TKINTER),y)
        rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/lib-tk
 endif
 
-python: uclibc $(PYTHON_DEPS) $(TARGET_DIR)/$(PYTHON_TARGET_BINARY)
+$(STAGING_DIR)/usr/lib/libpython$(PYTHON_VERSION_MAJOR).so: $(TARGET_DIR)/$(PYTHON_TARGET_BINARY)
+               cp -dpr $(PYTHON_DIR)/libpython*.so.* $(STAGING_DIR)/usr/lib
+               (\
+               cd $(STAGING_DIR)/usr/lib ; \
+               rm -f libpython$(PYTHON_VERSION_MAJOR).so ; \
+               ln -s `basename  \`ls libpython*.so.*\`` libpython$(PYTHON_VERSION_MAJOR).so \
+               )
+
+libpython:     $(STAGING_DIR)/usr/lib/libpython$(PYTHON_VERSION_MAJOR).so
+
+python: uclibc $(PYTHON_DEPS) $(TARGET_DIR)/$(PYTHON_TARGET_BINARY) libpython
 
 python-clean:
        -$(MAKE) -C $(PYTHON_DIR) distclean