[PATCH] gen_init_cpio uses external file list
[linux-flexiantxendom0-3.2.10.git] / usr / Makefile
1
2 obj-y := initramfs_data.o
3
4 hostprogs-y  := gen_init_cpio
5
6 clean-files := initramfs_data.cpio.gz
7
8 # If you want a different list of files in the initramfs_data.cpio
9 # then you can either overwrite the cpio_list in this directory
10 # or set INITRAMFS_LIST to another filename.
11 INITRAMFS_LIST ?= $(obj)/initramfs_list
12
13 # initramfs_data.o contains the initramfs_data.cpio.gz image.
14 # The image is included using .incbin, a dependency which is not
15 # tracked automatically.
16 $(obj)/initramfs_data.o: $(obj)/initramfs_data.cpio.gz FORCE
17
18 # initramfs-y are the programs which will be copied into the CPIO
19 # archive. Currently, the filenames are hardcoded in gen_init_cpio,
20 # but we need the information for the build as well, so it's duplicated
21 # here.
22
23 # Commented out for now
24 # initramfs-y := $(obj)/root/hello
25
26 quiet_cmd_cpio = CPIO    $@
27       cmd_cpio = ./$< $(INITRAMFS_LIST) > $@
28
29 $(obj)/initramfs_data.cpio: $(obj)/gen_init_cpio $(initramfs-y) $(INITRAMFS_LIST) FORCE
30         $(call if_changed,cpio)
31
32 targets += initramfs_data.cpio
33
34 $(obj)/initramfs_data.cpio.gz: $(obj)/initramfs_data.cpio FORCE
35         $(call if_changed,gzip)
36
37 targets += initramfs_data.cpio.gz
38