+define BuildImage
+
+ download:
+ prepare:
+
+ ifeq ($(IB),)
+ compile: compile-targets FORCE
+ $(call Build/Compile)
+ else
+ compile:
+ endif
+
+ ifeq ($(IB),)
+ install: compile install-targets FORCE
+ $(call Image/Prepare)
+ $(call Image/mkfs/prepare)
+ $(call Image/BuildKernel)
+ $(call Image/mkfs/cpiogz)
+ $(call Image/mkfs/targz)
+ $(call Image/mkfs/ext4)
+ $(call Image/mkfs/iso)
+ $(call Image/mkfs/jffs2)
+ $(call Image/mkfs/squashfs)
+ $(call Image/mkfs/ubifs)
+ $(call Image/Checksum)
+ else
+ install: compile install-targets
+ $(call Image/BuildKernel)
+ $(call Image/mkfs/cpiogz)
+ $(call Image/mkfs/targz)
+ $(call Image/mkfs/ext4)
+ $(call Image/mkfs/iso)
+ $(call Image/mkfs/jffs2)
+ $(call Image/mkfs/squashfs)
+ $(call Image/mkfs/ubifs)
+ $(call Image/Checksum)
+ endif
+
+ ifeq ($(IB),)
+ clean: clean-targets
+ $(call Build/Clean)
+ else
+ clean:
+ endif
+
+ compile-targets:
+ install-targets:
+ clean-targets:
+
+endef