Makefile 858 字节
Newer Older
L
Linus Torvalds 已提交
1
#
2
# arch/cris/arch-v10/boot/compressed/Makefile
L
Linus Torvalds 已提交
3 4
#

5
CC = gcc-cris -melf $(LINUXINCLUDE)
6
ccflags-y += -O2
L
Linus Torvalds 已提交
7
LD = ld-cris
8
ldflags-y += -T $(obj)/decompress.ld
9
OBJECTS = $(obj)/head.o $(obj)/misc.o
L
Linus Torvalds 已提交
10 11 12
OBJCOPY = objcopy-cris
OBJCOPYFLAGS = -O binary --remove-section=.bss

13 14
quiet_cmd_image = BUILD   $@
cmd_image = cat $(obj)/decompress.bin $(obj)/piggy.gz > $@
L
Linus Torvalds 已提交
15

16
targets := vmlinux piggy.gz decompress.o decompress.bin
L
Linus Torvalds 已提交
17

18 19
$(obj)/decompress.o: $(OBJECTS) FORCE
	$(call if_changed,ld)
L
Linus Torvalds 已提交
20

21 22
$(obj)/decompress.bin: $(obj)/decompress.o FORCE
	$(call if_changed,objcopy)
L
Linus Torvalds 已提交
23

24 25
$(obj)/head.o: $(obj)/head.S .config
	@$(CC) -D__ASSEMBLY__ -traditional -c $< -o $@
L
Linus Torvalds 已提交
26

27 28
$(obj)/misc.o: $(obj)/misc.c .config
	@$(CC) -D__KERNEL__ -c $< -o $@
L
Linus Torvalds 已提交
29

30 31
$(obj)/vmlinux: $(obj)/piggy.gz $(obj)/decompress.bin FORCE
	$(call if_changed,image)
L
Linus Torvalds 已提交
32

33 34
$(obj)/piggy.gz: $(obj)/../Image FORCE
	$(call if_changed,gzip)
L
Linus Torvalds 已提交
35