summaryrefslogtreecommitdiff
path: root/include
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
commit39cbeec7b212bb977bd5943c02bca5e38ff02f01 (patch)
treef914d26045e4ddd8f78730fbf170cb50136fc27f /include
parent3c11423892fc5872852fe4ffc0ba31d037d0e02c (diff)
downloadmtk-20170518-39cbeec7b212bb977bd5943c02bca5e38ff02f01.zip
mtk-20170518-39cbeec7b212bb977bd5943c02bca5e38ff02f01.tar.gz
mtk-20170518-39cbeec7b212bb977bd5943c02bca5e38ff02f01.tar.bz2
Add a PyMod template for python related modules
SVN-Revision: 8522
Diffstat (limited to 'include')
-rw-r--r--include/package.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/package.mk b/include/package.mk
index 1e18f8c..4b811f8 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 $@