PWD = $(shell pwd)
WORK = $(PWD)/work
-UBOOT_VERSION = 2011.09
+UBOOT_VERSION = 2011.12
-.PHONY: all mkimage clean dist-clean
+.PHONY: all help mkimage clean distclean cubox cubox-clean cubox-distclean efikamx efikamx-clean efikamx-distclean
-all: mkimage
+all: help
-clean: mkimage-clean
+help:
+ @echo "Usage: make <target>"
+ @echo "Where targets available are:"
+ @echo " mkimage Build mkimage binary for your host"
+ @echo " <device> Where device specified should appear under"
+ @echo " devices's dir as for example: cubox, efikamx, ..."
+ @echo " clean Remove generated files"
+ @echo " distclean Remove generated files and temporary sources"
-dist-clean: mkimage-distclean
+clean: mkimage-clean cubox-clean efikamx-clean
+
+distclean: mkimage-distclean cubox-distclean efikamx-distclean
$(WORK)/u-boot-$(UBOOT_VERSION).tar.bz2:
$(WORK)/u-boot-$(UBOOT_VERSION): $(WORK)/u-boot-$(UBOOT_VERSION).tar.bz2
tar -C $(WORK) -xjf $(WORK)/u-boot-$(UBOOT_VERSION).tar.bz2
- cd $(WORK)/u-boot-$(UBOOT_VERSION) && \
- patch -p1 -i $(WORK)/u-boot-$(UBOOT_VERSION).tools1.patch && \
- patch -p1 -i $(WORK)/u-boot-$(UBOOT_VERSION).tools2.patch && \
- patch -p1 -i $(WORK)/u-boot-$(UBOOT_VERSION).tools3.patch
touch $(WORK)/u-boot-$(UBOOT_VERSION)
$(WORK)/mkimage: $(WORK)/u-boot-$(UBOOT_VERSION)
rm -f $(WORK)/mkimage mkimage
mkimage-distclean: mkimage-clean
+ rm -rf $(WORK)/u-boot-$(UBOOT_VERSION) $(WORK)/u-boot-$(UBOOT_VERSION).tar.bz2
+
+cubox: mkimage
+ make -C devices/cubox
+
+cubox-clean:
+ make -C devices/cubox clean
+
+cubox-distclean:
+ make -C devices/cubox distclean
+
+efikamx: mkimage
+ make -C devices/efikamx
+
+efikamx-clean:
+ make -C devices/efikamx clean
+
+efikamx-distclean:
+ make -C devices/efikamx distclean
+
+# End of file