change defaults to check for configure script (avoids defining a null rule otherwise)
[openwrt.git] / package / rules.mk
index 916bb0f277f3ec8443331a91f51dfd95d24aae91..3f79b9f6be1fe08834413a883bf311990e79fdc5 100644 (file)
@@ -188,6 +188,7 @@ endef
 
 define Build/Configure/Default
        (cd $(PKG_BUILD_DIR); \
+       [ -x configure ] && \
                $(TARGET_CONFIGURE_OPTS) \
                CFLAGS="$(TARGET_CFLAGS)" \
                ./configure \
@@ -213,7 +214,13 @@ define Build/Configure
 endef
 
 define Build/Compile/Default
-# TODO: add configurable default command
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               CC=$(TARGET_CC) \
+               CROSS="$(TARGET_CROSS)" \
+               PREFIX="$$(IDIR_$(1))" \
+               EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
+               ARCH="$(ARCH)" \
+               DESTDIR="$$(IDIR_$(1))"
 endef
 
 define Build/Compile