-include $(TMP_DIR)/.packagedeps
$(curdir)/builddirs:=$(sort $(package-) $(package-y) $(package-m))
-$(curdir)/builddirs-default:=. $(sort $(package-y) $(package-m))
-$(curdir)/builddirs-prereq:=. $(sort $(prereq-y) $(prereq-m))
-$(curdir)/builddirs-install:=. $(sort $(package-y))
+ifeq ($(SDK),1)
+ $(curdir)/builddirs-install:=.
+else
+ $(curdir)/builddirs-default:=. $(sort $(package-y) $(package-m))
+ $(curdir)/builddirs-prereq:=. $(sort $(prereq-y) $(prereq-m))
+ $(curdir)/builddirs-install:=. $(sort $(package-y))
+endif
$(curdir)/install:=$(curdir)/install-cleanup
@-find $(TARGET_DIR) -name CVS | $(XARGS) rm -rf
@-find $(TARGET_DIR) -name .svn | $(XARGS) rm -rf
@-find $(TARGET_DIR) -name '.#*' | $(XARGS) rm -f
+ $(if $(CONFIG_CLEAN_IPKG),rm -rf $(TARGET_DIR)/usr/lib/ipkg)
$(curdir)/index: FORCE
@(cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh . > Packages)