CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Added some improvements to Makefile
authorJose V Beneyto <sepen@crux.nu>
Thu, 3 Nov 2011 10:39:19 +0000 (11:39 +0100)
committerJose V Beneyto <sepen@crux.nu>
Thu, 3 Nov 2011 10:39:19 +0000 (11:39 +0100)
devices/efikamx/Makefile

index 97c7d2aa78593e6bec32b2f4573597892aed8ea5..de8b9b67220b0a505169b0fadbc0ced4b058f7bc 100644 (file)
@@ -7,43 +7,44 @@ WORK = $(PWD)/work
 MKIMAGE = $(PWD)/../../work/mkimage
 ZIMAGE = $(PWD)/../../../kernel/efikamx/work/zImage
 INITRDGZ = $(PWD)/../../../initrd/work/initrd.gz
+BOOTSCRIPT = $(PWD)/boot.script
 
 .PHONY: all clean distclean uImage boot.scr uInitrd
 
-all: uImage boot.scr uInitrd
+all: uImage bootscr uInitrd
 
-clean: uImage-clean boot.scr-clean uInitrd-clean
+clean: uImage-clean bootscr-clean uInitrd-clean
 
 distclean: clean
 
-$(WORK)/zImage: $(ZIMAGE)
-       cp $(ZIMAGE) $(WORK)
-
-uImage: $(MKIMAGE) $(WORK)/zImage
+$(WORK)/uImage: $(MKIMAGE) $(ZIMAGE)
        $(MKIMAGE) -A arm -O linux -a 0x90008000 -e 0x90008000 \
        -T kernel -C none -n "Linux-2.6.31.14.22-efikamx" \
-       -d $(WORK)/zImage $(WORK)/uImage
+       -d $(ZIMAGE) $(WORK)/uImage
+
+uImage: $(WORK)/uImage
 
 uImage-clean:
-       rm -f $(WORK)/uImage $(WORK)/zImage
+       rm -f $(WORK)/uImage
 
-boot.scr: $(MKIMAGE) boot.script
+$(WORK)/boot.scr: $(MKIMAGE) $(BOOTSCRIPT)
        $(MKIMAGE) -A arm -O linux -a 0 -e 0 \
        -T script -C none -n "EfikaMX Boot Script" \
-       -d boot.script $(WORK)/boot.scr
+       -d $(BOOTSCRIPT) $(WORK)/boot.scr
 
-boot.scr-clean:
-       rm -f $(WORK)/boot.scr
+bootscr: $(WORK)/boot.scr
 
-$(WORK)/initrd.gz: $(INITRDGZ)
-       cp $(INITRDGZ) $(WORK)
+bootscr-clean:
+       rm -f $(WORK)/boot.scr
 
-uInitrd: $(MKIMAGE) $(WORK)/initrd.gz
+$(WORK)/uInitrd: $(MKIMAGE) $(INITRDGZ)
        $(MKIMAGE) -A arm -O linux -a 0 -e 0 \
        -T ramdisk -C none -n "EfikaMX Initrd Image" \
-       -d $(WORK)/initrd.gz $(WORK)/uInitrd
+       -d $(INITRDGZ) $(WORK)/uInitrd
+
+uInitrd: $(WORK)/uInitrd
 
 uInitrd-clean:
-       rm -f $(WORK)/uInitrd $(WORK)/initrd.gz
+       rm -f $(WORK)/uInitrd
 
 # End of file