aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2007-08-28 12:41:39 +0000
committerFlorian Fainelli <florian@openwrt.org>2007-08-28 12:41:39 +0000
commitfc677dd11c561967859c136e996b1a798be09592 (patch)
tree3e84ad442b9615f4ad92e6342414140eb1597ecc
parent8df971a1f97ce23d605c57e92e9cca4af262a761 (diff)
downloadupstream-fc677dd11c561967859c136e996b1a798be09592.tar.gz
upstream-fc677dd11c561967859c136e996b1a798be09592.tar.bz2
upstream-fc677dd11c561967859c136e996b1a798be09592.zip
Add a PyMod template for python related modules
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8522 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--include/package.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/package.mk b/include/package.mk
index 1e18f8cd81..4b811f8af6 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -128,6 +128,15 @@ define Build/Compile
$(call Build/Compile/Default,)
endef
+define Build/Compile/PyMod
+ cd $(PKG_BUILD_DIR); \
+ $(1) \
+ CFLAGS='-I$(STAGING_DIR)/usr/include' \
+ LDFLAGS='$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib' \
+ $(STAGING_DIR)/usr/bin/hostpython ./setup.py $(2) \
+ --prefix=$(PKG_INSTALL_DIR)/usr
+endef
+
$(PACKAGE_DIR):
mkdir -p $@