[PATCH] make clean should remove usr/initramfs_data.S
[linux-flexiantxendom0-3.2.10.git] / usr / Makefile
1
2 obj-y := initramfs_data.o
3
4 host-progs  := gen_init_cpio
5
6 clean-files := initramfs_data.cpio.gz initramfs_data.S
7
8 $(src)/initramfs_data.S: $(obj)/initramfs_data.cpio.gz
9         echo "  .section .init.ramfs,\"a\"" > $(src)/initramfs_data.S
10         echo ".incbin \"usr/initramfs_data.cpio.gz\"" >> $(src)/initramfs_data.S
11
12 # initramfs-y are the programs which will be copied into the CPIO
13 # archive. Currently, the filenames are hardcoded in gen_init_cpio,
14 # but we need the information for the build as well, so it's duplicated
15 # here.
16
17 # Commented out for now
18 # initramfs-y := $(obj)/root/hello
19
20 quiet_cmd_cpio = CPIO    $@
21       cmd_cpio = ./$< > $@
22
23 $(obj)/initramfs_data.cpio: $(obj)/gen_init_cpio $(initramfs-y) FORCE
24         $(call if_changed,cpio)
25
26 targets += initramfs_data.cpio
27
28 $(obj)/initramfs_data.cpio.gz: $(obj)/initramfs_data.cpio FORCE
29         $(call if_changed,gzip)
30
31 targets += initramfs_data.cpio.gz
32