Backport the PyMod template to 7.07 (#2312)
authorFlorian Fainelli <florian@openwrt.org>
Wed, 5 Sep 2007 09:58:44 +0000 (09:58 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Wed, 5 Sep 2007 09:58:44 +0000 (09:58 +0000)
SVN-Revision: 8619

include/package.mk

index 125355ba4a49bd41c3f6246dc6439021c1b1953d..c98f28d315cc5414a9ebc0267a700e56a67515ed 100644 (file)
@@ -126,6 +126,17 @@ define Build/Compile
   $(call Build/Compile/Default,)
 endef
 
+define Build/Compile/PyMod
+       ( cd $(PKG_BUILD_DIR); \
+               CFLAGS="$(TARGET_CFLAGS)" \
+               CPPFLAGS="$(TARGET_CPPFLAGS)" \
+               LDFLAGS="$(TARGET_LDFLAGS)" \
+               $(1) \
+               $(STAGING_DIR)/usr/bin/hostpython ./setup.py $(2) \
+                       --prefix="$(PKG_INSTALL_DIR)/usr" \
+       )
+endef
+
 $(PACKAGE_DIR):
        mkdir -p $@