Linux 2.2.0
[davej-history.git] / arch / alpha / Makefile
blobd48c8e09f916dfb434f4d1a44388471c3bfd48bf
2 # alpha/Makefile
4 # This file is subject to the terms and conditions of the GNU General Public
5 # License. See the file "COPYING" in the main directory of this archive
6 # for more details.
8 # Copyright (C) 1994 by Linus Torvalds
11 NM := nm -B
13 LINKFLAGS = -static -T arch/alpha/vmlinux.lds #-N -relax
14 CFLAGS := $(CFLAGS) -pipe -mno-fp-regs -ffixed-8
16 # Determine if we can use the BWX instructions with GAS.
17 old_gas := $(shell if $(AS) --version 2>&1 | grep 'version 2.7' > /dev/null; then echo y; else echo n; fi)
19 # Determine if GCC understands the -mcpu= option.
20 have_mcpu := $(shell if $(CC) -mcpu=ev5 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo y; else echo n; fi)
22 have_mcpu_pca56 := $(shell if $(CC) -mcpu=pca56 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo y; else echo n; fi)
24 have_mcpu_ev6 := $(shell if $(CC) -mcpu=ev6 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo y; else echo n; fi)
26 # Turn on the proper cpu optimizations.
27 ifeq ($(have_mcpu),y)
28 # If GENERIC, make sure to turn off any instruction set extensions that
29 # the host compiler might have on by default. Given that EV4 and EV5
30 # have the same instruction set, prefer EV5 because an EV5 schedule is
31 # more likely to keep an EV4 processor busy than vice-versa.
32 ifeq ($(CONFIG_ALPHA_GENERIC),y)
33 CFLAGS := $(CFLAGS) -mcpu=ev5
34 endif
35 ifeq ($(CONFIG_ALPHA_EV4),y)
36 CFLAGS := $(CFLAGS) -mcpu=ev4
37 endif
38 ifeq ($(CONFIG_ALPHA_PYXIS),y)
39 CFLAGS := $(CFLAGS) -mcpu=ev56
40 endif
41 ifeq ($(CONFIG_ALPHA_POLARIS),y)
42 ifeq ($(have_mcpu_pca56),y)
43 CFLAGS := $(CFLAGS) -mcpu=pca56
44 else
45 CFLAGS := $(CFLAGS) -mcpu=ev56
46 endif
47 endif
48 ifeq ($(CONFIG_ALPHA_EV6),y)
49 ifeq ($(have_mcpu_ev6),y)
50 CFLAGS := $(CFLAGS) -mcpu=ev6
51 else
52 ifeq ($(have_mcpu_pca56),y)
53 CFLAGS := $(CFLAGS) -mcpu=pca56
54 else
55 CFLAGS := $(CFLAGS) -mcpu=ev56
56 endif
57 endif
58 endif
59 endif
61 # For TSUNAMI, we must have the assembler not emulate our instructions.
62 # The same is true for POLARIS.
63 # BWX is most important, but we don't really want any emulation ever.
64 ifeq ($(old_gas),y)
65 ifneq ($(CONFIG_ALPHA_GENERIC)$(CONFIG_ALPHA_TSUNAMI)$(CONFIG_ALPHA_POLARIS),)
66 # How do we do #error in make?
67 CFLAGS := --error-please-upgrade-your-assembler
68 endif
69 else
70 ifeq ($(CONFIG_ALPHA_GENERIC),y)
71 CFLAGS := $(CFLAGS) -Wa,-mev6
72 endif
73 ifeq ($(CONFIG_ALPHA_PYXIS),y)
74 CFLAGS := $(CFLAGS) -Wa,-m21164a -DBWIO_ENABLED
75 endif
76 ifeq ($(CONFIG_ALPHA_POLARIS),y)
77 CFLAGS := $(CFLAGS) -Wa,-m21164pc
78 endif
79 ifeq ($(CONFIG_ALPHA_TSUNAMI),y)
80 CFLAGS := $(CFLAGS) -Wa,-mev6
81 endif
82 endif
84 HEAD := arch/alpha/kernel/head.o
86 SUBDIRS := $(SUBDIRS) arch/alpha/kernel arch/alpha/mm arch/alpha/lib \
87 arch/alpha/math-emu
88 CORE_FILES := arch/alpha/kernel/kernel.o arch/alpha/mm/mm.o $(CORE_FILES)
90 ifeq ($(CONFIG_MATHEMU),y)
91 CORE_FILES := $(CORE_FILES) arch/alpha/math-emu/math-emu.o
92 endif
94 LIBS := $(TOPDIR)/arch/alpha/lib/lib.a $(LIBS) $(TOPDIR)/arch/alpha/lib/lib.a
96 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
98 rawboot:
99 @$(MAKEBOOT) rawboot
102 # My boot writes directly to a specific disk partition, I doubt most
103 # people will want to do that without changes..
105 msb my-special-boot:
106 @$(MAKEBOOT) msb
108 bootimage:
109 @$(MAKEBOOT) bootimage
111 srmboot:
112 @$(MAKEBOOT) srmboot
114 archclean:
115 @$(MAKE) -C arch/$(ARCH)/kernel clean
116 @$(MAKEBOOT) clean
118 archmrproper:
120 archdep:
121 @$(MAKEBOOT) dep
123 bootpfile:
124 @$(MAKEBOOT) bootpfile