Browse Source

Add a PyMod template for python related modules

SVN-Revision: 8522
Florian Fainelli 18 years ago
parent
commit
39cbeec7b2
1 changed files with 9 additions and 0 deletions
  1. 9 0
      include/package.mk

+ 9 - 0
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 $@