~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/arch/mips/Makefile

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #
  2 # This file is subject to the terms and conditions of the GNU General Public
  3 # License.  See the file "COPYING" in the main directory of this archive
  4 # for more details.
  5 #
  6 # Copyright (C) 1994, 1995, 1996 by Ralf Baechle
  7 # DECStation modifications by Paul M. Antoine, 1996
  8 #
  9 # This file is included by the global makefile so that you can add your own
 10 # architecture-specific flags and dependencies. Remember to do have actions
 11 # for "archclean" and "archdep" for cleaning up and making dependencies for
 12 # this architecture
 13 #
 14 
 15 #
 16 # Select the object file format to substitute into the linker script.
 17 #
 18 ifdef CONFIG_CPU_LITTLE_ENDIAN
 19 tool-prefix     = mipsel-linux-
 20 else
 21 tool-prefix     = mips-linux-
 22 endif
 23 
 24 ifdef CONFIG_CROSSCOMPILE
 25 CROSS_COMPILE  = $(tool-prefix)
 26 endif
 27 
 28 #
 29 # The ELF GCC uses -G0 -mabicalls -fpic as default.  We don't need PIC
 30 # code in the kernel since it only slows down the whole thing.  For the
 31 # old GCC these options are just the defaults.  At some point we might
 32 # make use of global pointer optimizations.
 33 #
 34 # The DECStation requires an ECOFF kernel for remote booting, other MIPS
 35 # machines may also.  Since BFD is incredibly buggy with respect to
 36 # crossformat linking we rely on the elf2ecoff tool for format conversion.
 37 #
 38 CFLAGS          += -G 0 -mno-abicalls -fno-pic
 39 LINKFLAGS       += -static -G 0
 40 MODFLAGS        += -mlong-calls
 41 
 42 ifdef CONFIG_REMOTE_DEBUG
 43 CFLAGS          := $(CFLAGS) -g
 44 endif
 45 
 46 #
 47 # CPU-dependent compiler/assembler options for optimization.
 48 #
 49 ifdef CONFIG_CPU_R3000
 50 CFLAGS          := $(CFLAGS) -mcpu=r3000 -mips1
 51 endif
 52 ifdef CONFIG_CPU_R6000
 53 CFLAGS          := $(CFLAGS) -mcpu=r6000 -mips2 -Wa,--trap
 54 endif
 55 ifdef CONFIG_CPU_R4300
 56 CFLAGS          := $(CFLAGS) -mcpu=r4300 -mips2 -Wa,--trap
 57 endif
 58 ifdef CONFIG_CPU_R4X00
 59 CFLAGS          := $(CFLAGS) -mcpu=r4600 -mips2 -Wa,--trap
 60 endif
 61 ifdef CONFIG_CPU_R5000
 62 CFLAGS          := $(CFLAGS) -mcpu=r8000 -mips2 -Wa,--trap
 63 endif
 64 ifdef CONFIG_CPU_NEVADA
 65 CFLAGS          := $(CFLAGS) -mcpu=r8000 -mips2 -Wa,--trap -mmad
 66 endif
 67 ifdef CONFIG_CPU_R8000
 68 CFLAGS          := $(CFLAGS) -mcpu=r8000 -mips2 -Wa,--trap
 69 endif
 70 ifdef CONFIG_CPU_R10000
 71 CFLAGS          := $(CFLAGS) -mcpu=r8000 -mips2 -Wa,--trap
 72 endif
 73 
 74 #
 75 # Board-dependent options and extra files
 76 #
 77 ifdef CONFIG_ALGOR_P4032
 78 CORE_FILES    += arch/mips/algor/algor.o
 79 SUBDIRS       += arch/mips/algor
 80 #LOADADDR      += 0x80000000
 81 endif
 82 
 83 #
 84 # DECstation family
 85 #
 86 ifdef CONFIG_DECSTATION
 87 CORE_FILES    += arch/mips/dec/dec.o
 88 SUBDIRS       += arch/mips/dec arch/mips/dec/prom
 89 LIBS          += arch/mips/dec/prom/rexlib.a
 90 LOADADDR      += 0x80040000
 91 endif
 92 
 93 #
 94 # Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
 95 #
 96 ifdef CONFIG_MIPS_JAZZ
 97 CORE_FILES    += arch/mips/jazz/jazz.o
 98 SUBDIRS       += arch/mips/jazz arch/mips/arc
 99 LIBS          += arch/mips/arc/arclib.a
100 LOADADDR      += 0x80080000
101 endif
102 
103 ifdef CONFIG_COBALT_MICRO_SERVER
104 ARCHIVES      += arch/mips/cobalt/cobalt.o
105 SUBDIRS       += arch/mips/cobalt
106 LOADADDR      += 0x80000000
107 endif
108 
109 ifdef CONFIG_SNI_RM200_PCI
110 CORE_FILES    += arch/mips/sni/sni.o
111 SUBDIRS       += arch/mips/sni arch/mips/arc
112 LIBS          += arch/mips/arc/arclib.a
113 LOADADDR      += 0x80080000
114 endif
115 
116 ifdef CONFIG_SGI_IP22
117 LIBS          += arch/mips/sgi/kernel/sgikern.a arch/mips/arc/arclib.a
118 SUBDIRS       += arch/mips/sgi/kernel arch/mips/arc
119 #
120 # Set LOADADDR to >= 0x88069000 if you want to leave space for symmon,
121 # 0x88002000 for production kernels.  Note that the value must be
122 # 8kb aligned or the handling of the current variable will break.
123 #
124 LOADADDR      += 0x88002000
125 endif
126 
127 #
128 # Baget/MIPS
129 #
130 ifdef CONFIG_BAGET_MIPS
131 SUBDIRS       += arch/mips/baget arch/mips/baget/prom
132 LIBS          += arch/mips/baget/baget.a arch/mips/baget/prom/bagetlib.a
133 LOADADDR      += 0x80001000
134 endif
135 
136 #
137 # NEC DDB Vrc-5074
138 #
139 ifdef CONFIG_DDB5074
140 SUBDIRS       += arch/mips/ddb5074
141 LIBS          += arch/mips/ddb5074/ddb5074.a
142 LOADADDR      += 0x80080000
143 endif
144 
145 #
146 # Orion Board
147 #
148 ifdef CONFIG_ORION
149 LIBS          += arch/mips/orion/orionkern.a
150 SUBDIRS       += arch/mips/orion
151 LINKSCRIPT    = arch/mips/orion/ld.script.orion
152 endif
153 
154 #
155 # Choosing incompatible machines durings configuration will result in
156 # error messages during linking.  Select a default linkscript if
157 # none has been choosen above.
158 #
159 ifndef LINKSCRIPT
160 ifndef CONFIG_CPU_LITTLE_ENDIAN
161 LINKSCRIPT    = arch/mips/ld.script.big
162 else
163 LINKSCRIPT    = arch/mips/ld.script.little
164 endif
165 endif
166 LINKFLAGS     += -T $(word 1,$(LINKSCRIPT))
167 
168 ifdef LOADADDR
169 LINKFLAGS     += -Ttext $(word 1,$(LOADADDR))
170 endif
171 
172 #
173 # The pipe options is bad for my low-mem machine
174 # Uncomment this if you want this.
175 #
176 CFLAGS          += -pipe
177 
178 HEAD := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
179 
180 SUBDIRS := $(addprefix arch/mips/, tools) $(SUBDIRS) $(addprefix arch/mips/, kernel mm lib)
181 CORE_FILES := arch/mips/kernel/kernel.o arch/mips/mm/mm.o $(CORE_FILES)
182 LIBS := arch/mips/lib/lib.a $(LIBS)
183 
184 ifdef CONFIG_BAGET_MIPS
185 
186 BAGETBOOT = $(MAKE) -C arch/$(ARCH)/baget
187 
188 balo:  vmlinux
189         $(BAGETBOOT) balo
190 
191 endif
192 
193 ifdef CONFIG_ORION
194 ORIONBOOT = $(MAKE) -C arch/$(ARCH)/orion
195 
196 orionboot:
197         $(ORIONBOOT) orionboot
198 endif
199 
200 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
201 
202 zImage: vmlinux
203         @$(MAKEBOOT) zImage
204 
205 compressed: zImage
206 
207 zdisk: vmlinux
208         @$(MAKEBOOT) zdisk
209 
210 archclean:
211         @$(MAKEBOOT) clean
212         $(MAKE) -C arch/$(ARCH)/kernel clean
213         $(MAKE) -C arch/$(ARCH)/tools clean
214         $(MAKE) -C arch/mips/baget clean
215 
216 archmrproper:
217         @$(MAKEBOOT) mrproper
218         $(MAKE) -C arch/$(ARCH)/tools mrproper
219 
220 archdep:
221         if [ ! -f $(TOPDIR)/include/asm-$(ARCH)/offset.h ]; then \
222          touch $(TOPDIR)/include/asm-$(ARCH)/offset.h; \
223         fi;
224         @$(MAKEBOOT) dep

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.