diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2007-10-11 05:13:43 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2007-10-11 05:13:43 -0400 |
commit | 9b88467687550507cca30b49217518e8ba8cda4e (patch) | |
tree | bf3f43096a6fcd9c28cd6b94f9d6f2fcea30703e /arch/i386 | |
parent | 16ae1544b763b33673f82d667b0f7699dd1274b9 (diff) |
i386: prepare shared boot/compressed/Makefile
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/boot/compressed/Makefile | 51 | ||||
-rw-r--r-- | arch/i386/boot/compressed/Makefile_32 | 50 |
2 files changed, 53 insertions, 48 deletions
diff --git a/arch/i386/boot/compressed/Makefile b/arch/i386/boot/compressed/Makefile index 0c64c314eadb..78514f3f626f 100644 --- a/arch/i386/boot/compressed/Makefile +++ b/arch/i386/boot/compressed/Makefile | |||
@@ -1,50 +1,5 @@ | |||
1 | # | 1 | ifeq ($(CONFIG_X86_32),y) |
2 | # linux/arch/i386/boot/compressed/Makefile | 2 | include ${srctree}/arch/i386/boot/compressed/Makefile_32 |
3 | # | ||
4 | # create a compressed vmlinux image from the original vmlinux | ||
5 | # | ||
6 | |||
7 | targets := vmlinux vmlinux.bin vmlinux.bin.gz head_32.o misc_32.o piggy.o \ | ||
8 | vmlinux.bin.all vmlinux.relocs | ||
9 | EXTRA_AFLAGS := -traditional | ||
10 | |||
11 | LDFLAGS_vmlinux := -T | ||
12 | hostprogs-y := relocs | ||
13 | |||
14 | CFLAGS := -m32 -D__KERNEL__ $(LINUX_INCLUDE) -O2 \ | ||
15 | -fno-strict-aliasing -fPIC \ | ||
16 | $(call cc-option,-ffreestanding) \ | ||
17 | $(call cc-option,-fno-stack-protector) | ||
18 | LDFLAGS := -m elf_i386 | ||
19 | |||
20 | $(obj)/vmlinux: $(src)/vmlinux_32.lds $(obj)/head_32.o $(obj)/misc_32.o $(obj)/piggy.o FORCE | ||
21 | $(call if_changed,ld) | ||
22 | @: | ||
23 | |||
24 | $(obj)/vmlinux.bin: vmlinux FORCE | ||
25 | $(call if_changed,objcopy) | ||
26 | |||
27 | quiet_cmd_relocs = RELOCS $@ | ||
28 | cmd_relocs = $(obj)/relocs $< > $@;$(obj)/relocs --abs-relocs $< | ||
29 | $(obj)/vmlinux.relocs: vmlinux $(obj)/relocs FORCE | ||
30 | $(call if_changed,relocs) | ||
31 | |||
32 | vmlinux.bin.all-y := $(obj)/vmlinux.bin | ||
33 | vmlinux.bin.all-$(CONFIG_RELOCATABLE) += $(obj)/vmlinux.relocs | ||
34 | quiet_cmd_relocbin = BUILD $@ | ||
35 | cmd_relocbin = cat $(filter-out FORCE,$^) > $@ | ||
36 | $(obj)/vmlinux.bin.all: $(vmlinux.bin.all-y) FORCE | ||
37 | $(call if_changed,relocbin) | ||
38 | |||
39 | ifdef CONFIG_RELOCATABLE | ||
40 | $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin.all FORCE | ||
41 | $(call if_changed,gzip) | ||
42 | else | 3 | else |
43 | $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE | 4 | include ${srctree}/arch/x86_64/boot/compressed/Makefile_64 |
44 | $(call if_changed,gzip) | ||
45 | endif | 5 | endif |
46 | |||
47 | LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T | ||
48 | |||
49 | $(obj)/piggy.o: $(src)/vmlinux_32.scr $(obj)/vmlinux.bin.gz FORCE | ||
50 | $(call if_changed,ld) | ||
diff --git a/arch/i386/boot/compressed/Makefile_32 b/arch/i386/boot/compressed/Makefile_32 new file mode 100644 index 000000000000..0c64c314eadb --- /dev/null +++ b/arch/i386/boot/compressed/Makefile_32 | |||
@@ -0,0 +1,50 @@ | |||
1 | # | ||
2 | # linux/arch/i386/boot/compressed/Makefile | ||
3 | # | ||
4 | # create a compressed vmlinux image from the original vmlinux | ||
5 | # | ||
6 | |||
7 | targets := vmlinux vmlinux.bin vmlinux.bin.gz head_32.o misc_32.o piggy.o \ | ||
8 | vmlinux.bin.all vmlinux.relocs | ||
9 | EXTRA_AFLAGS := -traditional | ||
10 | |||
11 | LDFLAGS_vmlinux := -T | ||
12 | hostprogs-y := relocs | ||
13 | |||
14 | CFLAGS := -m32 -D__KERNEL__ $(LINUX_INCLUDE) -O2 \ | ||
15 | -fno-strict-aliasing -fPIC \ | ||
16 | $(call cc-option,-ffreestanding) \ | ||
17 | $(call cc-option,-fno-stack-protector) | ||
18 | LDFLAGS := -m elf_i386 | ||
19 | |||
20 | $(obj)/vmlinux: $(src)/vmlinux_32.lds $(obj)/head_32.o $(obj)/misc_32.o $(obj)/piggy.o FORCE | ||
21 | $(call if_changed,ld) | ||
22 | @: | ||
23 | |||
24 | $(obj)/vmlinux.bin: vmlinux FORCE | ||
25 | $(call if_changed,objcopy) | ||
26 | |||
27 | quiet_cmd_relocs = RELOCS $@ | ||
28 | cmd_relocs = $(obj)/relocs $< > $@;$(obj)/relocs --abs-relocs $< | ||
29 | $(obj)/vmlinux.relocs: vmlinux $(obj)/relocs FORCE | ||
30 | $(call if_changed,relocs) | ||
31 | |||
32 | vmlinux.bin.all-y := $(obj)/vmlinux.bin | ||
33 | vmlinux.bin.all-$(CONFIG_RELOCATABLE) += $(obj)/vmlinux.relocs | ||
34 | quiet_cmd_relocbin = BUILD $@ | ||
35 | cmd_relocbin = cat $(filter-out FORCE,$^) > $@ | ||
36 | $(obj)/vmlinux.bin.all: $(vmlinux.bin.all-y) FORCE | ||
37 | $(call if_changed,relocbin) | ||
38 | |||
39 | ifdef CONFIG_RELOCATABLE | ||
40 | $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin.all FORCE | ||
41 | $(call if_changed,gzip) | ||
42 | else | ||
43 | $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE | ||
44 | $(call if_changed,gzip) | ||
45 | endif | ||
46 | |||
47 | LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T | ||
48 | |||
49 | $(obj)/piggy.o: $(src)/vmlinux_32.scr $(obj)/vmlinux.bin.gz FORCE | ||
50 | $(call if_changed,ld) | ||