aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/Makefile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/ppc64/Makefile
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'arch/ppc64/Makefile')
-rw-r--r--arch/ppc64/Makefile122
1 files changed, 122 insertions, 0 deletions
diff --git a/arch/ppc64/Makefile b/arch/ppc64/Makefile
new file mode 100644
index 000000000000..d33e20bcc52f
--- /dev/null
+++ b/arch/ppc64/Makefile
@@ -0,0 +1,122 @@
1# This file is included by the global makefile so that you can add your own
2# architecture-specific flags and dependencies. Remember to do have actions
3# for "archclean" and "archdep" for cleaning up and making dependencies for
4# this architecture
5#
6# This file is subject to the terms and conditions of the GNU General Public
7# License. See the file "COPYING" in the main directory of this archive
8# for more details.
9#
10# Copyright (C) 1994 by Linus Torvalds
11# Changes for PPC by Gary Thomas
12# Rewritten by Cort Dougan and Paul Mackerras
13# Adjusted for PPC64 by Tom Gall
14#
15
16KERNELLOAD := 0xc000000000000000
17
18# Set default 32 bits cross compilers for vdso and boot wrapper
19CROSS32_COMPILE ?=
20
21CROSS32CC := $(CROSS32_COMPILE)gcc
22CROSS32AS := $(CROSS32_COMPILE)as
23CROSS32LD := $(CROSS32_COMPILE)ld
24CROSS32OBJCOPY := $(CROSS32_COMPILE)objcopy
25
26# If we have a biarch compiler, use it for 32 bits cross compile if
27# CROSS32_COMPILE wasn't explicitely defined, and add proper explicit
28# target type to target compilers
29
30HAS_BIARCH := $(call cc-option-yn, -m64)
31ifeq ($(HAS_BIARCH),y)
32ifeq ($(CROSS32_COMPILE),)
33CROSS32CC := $(CC) -m32
34CROSS32AS := $(AS) -a32
35CROSS32LD := $(LD) -m elf32ppc
36CROSS32OBJCOPY := $(OBJCOPY)
37endif
38AS := $(AS) -a64
39LD := $(LD) -m elf64ppc
40CC := $(CC) -m64
41endif
42
43export CROSS32CC CROSS32AS CROSS32LD CROSS32OBJCOPY
44
45new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi)
46
47ifeq ($(new_nm),y)
48NM := $(NM) --synthetic
49
50endif
51
52CHECKFLAGS += -m64 -D__powerpc__
53
54LDFLAGS := -m elf64ppc
55LDFLAGS_vmlinux := -Bstatic -e $(KERNELLOAD) -Ttext $(KERNELLOAD)
56CFLAGS += -msoft-float -pipe -mminimal-toc -mtraceback=none \
57 -mcall-aixdesc
58
59ifeq ($(CONFIG_POWER4_ONLY),y)
60ifeq ($(CONFIG_ALTIVEC),y)
61 CFLAGS += $(call cc-option,-mcpu=970)
62else
63 CFLAGS += $(call cc-option,-mcpu=power4)
64endif
65else
66 CFLAGS += $(call cc-option,-mtune=power4)
67endif
68
69# Enable unit-at-a-time mode when possible. It shrinks the
70# kernel considerably.
71CFLAGS += $(call cc-option,-funit-at-a-time)
72
73head-y := arch/ppc64/kernel/head.o
74
75libs-y += arch/ppc64/lib/
76core-y += arch/ppc64/kernel/
77core-y += arch/ppc64/mm/
78core-$(CONFIG_XMON) += arch/ppc64/xmon/
79drivers-$(CONFIG_OPROFILE) += arch/ppc64/oprofile/
80
81boot := arch/ppc64/boot
82
83boottarget-$(CONFIG_PPC_PSERIES) := zImage zImage.initrd
84boottarget-$(CONFIG_PPC_MAPLE) := zImage zImage.initrd
85boottarget-$(CONFIG_PPC_ISERIES) := vmlinux.sminitrd vmlinux.initrd vmlinux.sm
86$(boottarget-y): vmlinux
87 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
88
89bootimage-$(CONFIG_PPC_PSERIES) := $(boot)/zImage
90bootimage-$(CONFIG_PPC_PMAC) := vmlinux
91bootimage-$(CONFIG_PPC_MAPLE) := $(boot)/zImage
92bootimage-$(CONFIG_PPC_ISERIES) := vmlinux
93BOOTIMAGE := $(bootimage-y)
94install: vmlinux
95 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@
96
97defaultimage-$(CONFIG_PPC_PSERIES) := zImage
98defaultimage-$(CONFIG_PPC_PMAC) := vmlinux
99defaultimage-$(CONFIG_PPC_MAPLE) := zImage
100defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux
101KBUILD_IMAGE := $(defaultimage-y)
102all: $(KBUILD_IMAGE)
103
104archclean:
105 $(Q)$(MAKE) $(clean)=$(boot)
106
107prepare: include/asm-ppc64/offsets.h
108
109arch/ppc64/kernel/asm-offsets.s: include/asm include/linux/version.h \
110 include/config/MARKER
111
112include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.s
113 $(call filechk,gen-asm-offsets)
114
115define archhelp
116 echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
117 echo ' zImage.initrd- Compressed kernel image with initrd attached,'
118 echo ' sourced from arch/$(ARCH)/boot/ramdisk.image.gz'
119 echo ' (arch/$(ARCH)/boot/zImage.initrd)'
120endef
121
122CLEAN_FILES += include/asm-ppc64/offsets.h