CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Added some improvements to Makefile
[bootloader.git] / Makefile
CommitLineData
cf491568
JB
1#
2# uboot/Makefile
3#
4
73bb00a3 5PWD = $(shell pwd)
cf491568
JB
6WORK = $(PWD)/work
7
73bb00a3
JB
8UBOOT_VERSION = 2011.09
9
64ac62a7 10.PHONY: all help mkimage clean dist-clean 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"
19 @echo " devices's dir as for example efikamx, wm8505, ..."
20 @echo " clean Remove generated files"
21 @echo " distclean Remove generated files and temporary sources"
cf491568 22
64ac62a7
JB
23clean: mkimage-clean efikamx-clean
24
25distclean: mkimage-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
33 cd $(WORK)/u-boot-$(UBOOT_VERSION) && \
953e00fa
JB
34 patch -p1 -i $(WORK)/u-boot-$(UBOOT_VERSION).tools1.patch && \
35 patch -p1 -i $(WORK)/u-boot-$(UBOOT_VERSION).tools2.patch && \
36 patch -p1 -i $(WORK)/u-boot-$(UBOOT_VERSION).tools3.patch
73bb00a3
JB
37 touch $(WORK)/u-boot-$(UBOOT_VERSION)
38
39$(WORK)/mkimage: $(WORK)/u-boot-$(UBOOT_VERSION)
953e00fa 40 cd $(WORK)/u-boot-$(UBOOT_VERSION) && \
73bb00a3
JB
41 make tools && \
42 install -m 0755 $(WORK)/u-boot-$(UBOOT_VERSION)/tools/mkimage $(WORK)/mkimage
cf491568
JB
43
44mkimage: $(WORK)/mkimage
45
46mkimage-clean:
47 rm -f $(WORK)/mkimage mkimage
48
49mkimage-distclean: mkimage-clean
64ac62a7
JB
50 rm -rf $(WORK)/u-boot-$(UBOOT_VERSION) $(WORK)/u-boot-$(UBOOT_VERSION).tar.bz2
51
52efikamx: mkimage
53 make -C devices/efikamx
54
55efikamx-clean:
56 make -C devices/efikamx clean
57
58efikamx-distclean:
59 make -C devices/efikamx distclean
60
61# End of file