CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Added ramdisk_type as conditional in Makefile to use templates
[bootloader.git] / Makefile
CommitLineData
cf491568
JB
1#
2# uboot/Makefile
3#
4
73bb00a3 5PWD = $(shell pwd)
cf491568
JB
6WORK = $(PWD)/work
7
5cf83243 8UBOOT_VERSION = 2011.12
73bb00a3 9
4d7a4562 10.PHONY: all help mkimage clean distclean cubox cubox-clean cubox-distclean efikamx efikamx-clean efikamx-distclean
cf491568 11
64ac62a7 12all: help
cf491568 13
64ac62a7
JB
14help:
15 @echo "Usage: make <target>"
16 @echo "Where targets available are:"
17 @echo " mkimage Build mkimage binary for your host"
18 @echo " <device> Where device specified should appear under"
4d7a4562 19 @echo " devices's dir as for example: cubox, efikamx, ..."
64ac62a7
JB
20 @echo " clean Remove generated files"
21 @echo " distclean Remove generated files and temporary sources"
cf491568 22
4d7a4562 23clean: mkimage-clean cubox-clean efikamx-clean
64ac62a7 24
4d7a4562 25distclean: mkimage-distclean cubox-distclean efikamx-distclean
cf491568 26
73bb00a3
JB
27
28$(WORK)/u-boot-$(UBOOT_VERSION).tar.bz2:
29 wget -P $(WORK) ftp://ftp.denx.de/pub/u-boot/u-boot-$(UBOOT_VERSION).tar.bz2
30
31$(WORK)/u-boot-$(UBOOT_VERSION): $(WORK)/u-boot-$(UBOOT_VERSION).tar.bz2
32 tar -C $(WORK) -xjf $(WORK)/u-boot-$(UBOOT_VERSION).tar.bz2
73bb00a3
JB
33 touch $(WORK)/u-boot-$(UBOOT_VERSION)
34
35$(WORK)/mkimage: $(WORK)/u-boot-$(UBOOT_VERSION)
953e00fa 36 cd $(WORK)/u-boot-$(UBOOT_VERSION) && \
73bb00a3
JB
37 make tools && \
38 install -m 0755 $(WORK)/u-boot-$(UBOOT_VERSION)/tools/mkimage $(WORK)/mkimage
cf491568
JB
39
40mkimage: $(WORK)/mkimage
41
42mkimage-clean:
43 rm -f $(WORK)/mkimage mkimage
44
45mkimage-distclean: mkimage-clean
64ac62a7
JB
46 rm -rf $(WORK)/u-boot-$(UBOOT_VERSION) $(WORK)/u-boot-$(UBOOT_VERSION).tar.bz2
47
4d7a4562
JB
48cubox: mkimage
49 make -C devices/cubox
50
51cubox-clean:
52 make -C devices/cubox clean
53
54cubox-distclean:
55 make -C devices/cubox distclean
56
64ac62a7
JB
57efikamx: mkimage
58 make -C devices/efikamx
59
60efikamx-clean:
61 make -C devices/efikamx clean
62
63efikamx-distclean:
64 make -C devices/efikamx distclean
65
66# End of file