ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / arm / boot / compressed / Makefile
1 #
2 # linux/arch/arm/boot/compressed/Makefile
3 #
4 # create a compressed vmlinuz image from the original vmlinux
5 #
6 # Note! ZTEXTADDR, ZBSSADDR and ZRELADDR are now exported
7 # from arch/arm/boot/Makefile
8 #
9
10 HEAD    = head.o
11 OBJS    = misc.o
12 FONTC   = drivers/video/console/font_acorn_8x8.c
13
14 #
15 # Architecture dependencies
16 #
17 ifeq ($(CONFIG_ARCH_ACORN),y)
18 OBJS            += ll_char_wr.o font.o
19 CFLAGS_misc.o   := -DPARAMS_PHYS=$(PARAMS_PHYS)
20 endif
21
22 ifeq ($(CONFIG_ARCH_SHARK),y)
23 OBJS            += head-shark.o ofw-shark.o
24 endif
25
26 ifeq ($(CONFIG_ARCH_CAMELOT),y)
27 OBJS            += head-epxa10db.o
28 endif
29
30 ifeq ($(CONFIG_ARCH_FTVPCI),y)
31 OBJS            += head-ftvpci.o
32 endif
33
34 ifeq ($(CONFIG_ARCH_L7200),y)
35 OBJS            += head-l7200.o
36 endif
37
38 ifeq ($(CONFIG_ARCH_CLPS7500),y)
39 HEAD            = head-clps7500.o
40 endif
41
42 ifeq ($(CONFIG_ARCH_P720T),y)
43 # Borrow this code from SA1100
44 OBJS            += head-sa1100.o
45 endif
46
47 ifeq ($(CONFIG_ARCH_SA1100),y)
48 OBJS            += head-sa1100.o
49 ifeq ($(CONFIG_SA1100_NANOENGINE),y)
50   OBJS += hw-bse.o
51 endif
52 endif
53
54 ifeq ($(CONFIG_CPU_XSCALE),y)
55 OBJS            += head-xscale.o
56 endif
57
58 ifeq ($(CONFIG_DEBUG_ICEDCC),y)
59 OBJS            += ice-dcc.o
60 endif
61
62 SEDFLAGS        = s/TEXT_START/$(ZTEXTADDR)/;s/LOAD_ADDR/$(ZRELADDR)/;s/BSS_START/$(ZBSSADDR)/
63
64 targets       := vmlinux vmlinux.lds piggy piggy.gz piggy.o \
65                  font.o head.o $(OBJS)
66 EXTRA_CFLAGS  := -fpic
67 EXTRA_AFLAGS  :=
68
69 LDFLAGS_vmlinux := -p --no-undefined -X \
70         $(shell $(CC) $(CFLAGS) --print-libgcc-file-name) -T
71
72 $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \
73                 $(addprefix $(obj)/, $(OBJS)) FORCE
74         $(call if_changed,ld)
75         @:
76
77
78 $(obj)/piggy: vmlinux FORCE
79         $(call if_changed,objcopy)
80
81 $(obj)/piggy.gz: $(obj)/piggy FORCE
82         $(call if_changed,gzip)
83
84 LDFLAGS_piggy.o := -r -b binary
85 $(obj)/piggy.o:  $(obj)/piggy.gz FORCE
86         $(call if_changed,ld)
87
88 CFLAGS_font.o := -Dstatic=
89 $(obj)/font.o: $(FONTC)
90
91 $(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in Makefile arch/arm/boot/Makefile .config
92         @sed "$(SEDFLAGS)" < $< > $@
93
94 $(obj)/misc.o: $(obj)/misc.c include/asm/arch/uncompress.h lib/inflate.c
95