provide default PKG_BUILD_DIR for packages missing a PKG_VERSION
[openwrt.git] / rules.mk
index e76c75d..b817537 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -8,6 +8,7 @@
 ifeq ($(DUMP),)
   -include $(TOPDIR)/.config
 endif
+include $(TOPDIR)/include/debug.mk
 include $(TOPDIR)/include/verbose.mk
 
 TMP_DIR:=$(TOPDIR)/tmp
@@ -25,6 +26,7 @@ ARCH:=$(call qstrip,$(CONFIG_ARCH))
 TARGET_OPTIMIZATION:=$(call qstrip,$(CONFIG_TARGET_OPTIMIZATION))
 BUILD_SUFFIX:=$(call qstrip,$(CONFIG_BUILD_SUFFIX))
 GCCV:=$(call qstrip,$(CONFIG_GCC_VERSION))
+SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
 
 OPTIMIZE_FOR_CPU:=$(ARCH)
 
@@ -95,8 +97,8 @@ TARGET_CONFIGURE_OPTS:= \
   RANLIB=$(TARGET_CROSS)ranlib \
   STRIP=$(TARGET_CROSS)strip \
   OBJCOPY=$(TARGET_CROSS)objcopy \
-       OBJDUMP=$(TARGET_CROSS)objdump \
-       SIZE=$(TARGET_CROSS)size
+  OBJDUMP=$(TARGET_CROSS)objdump \
+  SIZE=$(TARGET_CROSS)size
 
 # strip an entire directory
 RSTRIP:= \
@@ -105,19 +107,6 @@ RSTRIP:= \
   STRIP_KMOD="$(TARGET_CROSS)strip --strip-unneeded --remove-section=.comment" \
   $(SCRIPT_DIR)/rstrip.sh
 
-# where to build (and put) .ipk packages
-IPKG:= \
-  PATH="$(STAGING_DIR_HOST)/bin:$(PATH)" \
-  IPKG_TMP=$(TMP_DIR)/ipkg \
-  IPKG_INSTROOT=$(TARGET_DIR) \
-  IPKG_CONF_DIR=$(STAGING_DIR)/etc \
-  IPKG_OFFLINE_ROOT=$(TARGET_DIR) \
-  $(SCRIPT_DIR)/ipkg -force-defaults -force-depends
-
-# invoke ipkg-build with some default options
-IPKG_BUILD:= \
-  ipkg-build -c -o 0 -g 0
-
 ifeq ($(CONFIG_ENABLE_LOCALE),true)
   DISABLE_NLS:=
 else
This page took 0.024051 seconds and 4 git commands to generate.