f269a5f7701f5a509e51481c4bbddd4300e5e357
[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 initramfs_list
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 filechk_initramfs_list = $(CONFIG_SHELL) \
27  $(srctree)/scripts/gen_initramfs_list.sh $(CONFIG_INITRAMFS_SOURCE)
28                            
29 $(obj)/initramfs_list: FORCE
30         $(call filechk,initramfs_list)
31
32 quiet_cmd_cpio = CPIO    $@
33       cmd_cpio = ./$< $(obj)/initramfs_list > $@
34
35 $(obj)/initramfs_data.cpio: $(obj)/gen_init_cpio \
36                             $(initramfs-y) $(obj)/initramfs_list FORCE
37         $(call if_changed,cpio)
38
39 targets += initramfs_data.cpio
40
41 $(obj)/initramfs_data.cpio.gz: $(obj)/initramfs_data.cpio FORCE
42         $(call if_changed,gzip)
43
44 targets += initramfs_data.cpio.gz
45