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

Linux Cross Reference
Linux/arch/arm/Makefile

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

  1 #
  2 # arch/arm/Makefile
  3 #
  4 # This file is included by the global makefile so that you can add your own
  5 # architecture-specific flags and dependencies. Remember to do have actions
  6 # for "archclean" and "archdep" for cleaning up and making dependencies for
  7 # this architecture
  8 #
  9 # This file is subject to the terms and conditions of the GNU General Public
 10 # License.  See the file "COPYING" in the main directory of this archive
 11 # for more details.
 12 #
 13 # Copyright (C) 1995-2000 by Russell King
 14 
 15 OBJCOPY         := $(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S
 16 CPP             := $(CC) -E
 17 LINKFLAGS       := -p -X -T arch/arm/vmlinux.lds
 18 ARCHCC          := $(word 1,$(CC))
 19 
 20 AFLAGS          += -mno-fpu
 21 CFLAGS_PIPE     := -pipe
 22 CFLAGS          := $(CFLAGS) $(CFLAGS_PIPE) -msoft-float
 23 
 24 ifdef CONFIG_FRAME_POINTER
 25 CFLAGS          := $(CFLAGS:-fomit-frame-pointer=)
 26 endif
 27 
 28 ifdef CONFIG_DEBUG_INFO
 29 CFLAGS          += -g
 30 endif
 31 
 32 GZFLAGS         = -9
 33 
 34 # Ensure this is ld "2.9.4" or later
 35 NEW_LINKER      := $(shell $(LD) --gc-sections --version >/dev/null 2>&1; echo $$?)
 36 
 37 ifneq ($(NEW_LINKER),0)
 38 dummy:;         @echo '*** ${VERSION}.${PATCHLEVEL} kernels no longer build correctly with old versions of binutils.'
 39                 @echo '*** Please upgrade your binutils to 2.9.5.'
 40                 @false
 41 endif
 42 
 43 # GCC 2.7 uses different options to later compilers; sort out which we have
 44 NEW_GCC         := $(shell $(CC) --version 2>&1 | grep '^2\.7' > /dev/null; echo $$?)
 45 
 46 #
 47 # select flags depending on the compiler
 48 #
 49 ifneq ($(NEW_GCC),0)
 50 CFLAGS                  += -mshort-load-bytes
 51 CFLAGS_PROC_CPU_26      := -mcpu=arm3 -mapcs-26 -Os
 52 CFLAGS_PROC_CPU_32v3    := -march=armv3
 53 CFLAGS_PROC_CPU_32v4    := -march=armv4
 54 else
 55 CFLAGS                  += -DNO_TEXT_SECTIONS
 56 CFLAGS_PROC_CPU_26      := -m3
 57 CFLAGS_PROC_CPU_32v3    := -m6
 58 CFLAGS_PROC_CPU_32v4    := -m6
 59 endif
 60 
 61 #
 62 # Select CPU dependent flags
 63 #
 64 ifeq ($(CONFIG_CPU_26),y)
 65  PROCESSOR       = armo
 66  TEXTADDR        = 0x02080000
 67  CFLAGS         += $(CFLAGS_PROC_CPU_26)
 68  AFLAGS         += -mapcs-26
 69 endif
 70 
 71 ifeq ($(CONFIG_CPU_32),y)
 72  PROCESSOR       = armv
 73  TEXTADDR        = 0xC0008000
 74  ifeq ($(CONFIG_CPU_32v4),y)
 75   CFLAGS        += $(CFLAGS_PROC_CPU_32v4)
 76   AFLAGS        += -mapcs-32 -marmv4
 77  else
 78   CFLAGS        += $(CFLAGS_PROC_CPU_32v3)
 79   AFLAGS        += -mapcs-32 -marmv3m
 80  endif
 81 
 82  opt-$(CONFIG_CPU_ARM6)         := -mtune=arm6
 83  opt-$(CONFIG_CPU_ARM7)         := -mtune=arm7
 84  opt-$(CONFIG_CPU_ARM720)       := -mtune=arm7tdmi
 85  opt-$(CONFIG_CPU_ARM920)       := -mtune=arm9tdmi
 86  opt-$(CONFIG_CPU_SA110)        := -mtune=strongarm110
 87  opt-$(CONFIG_CPU_SA1100)       := -mtune=strongarm110
 88 
 89  ifneq ($(NEW_GCC),0)
 90  CFLAGS += $(opt-y)
 91  endif
 92 endif
 93 
 94 LIBGCC          := $(shell $(CC) $(CFLAGS) --print-libgcc-file-name)
 95 
 96 export  LIBGCC MACHINE PROCESSOR TEXTADDR GZFLAGS
 97 
 98 ifeq ($(CONFIG_ARCH_ARCA5K),y)
 99 MACHINE          = arc
100 endif
101 
102 ifeq ($(CONFIG_ARCH_RPC),y)
103 MACHINE          = rpc
104 endif
105 
106 ifeq ($(CONFIG_ARCH_EBSA110),y)
107 MACHINE          = ebsa110
108 endif
109 
110 ifeq ($(CONFIG_ARCH_CLPS7500),y)
111 MACHINE          = clps7500
112 INCDIR           = cl7500
113 endif
114 
115 ifeq ($(CONFIG_FOOTBRIDGE),y)
116 MACHINE          = footbridge
117 INCDIR           = ebsa285
118 endif
119 
120 ifeq ($(CONFIG_ARCH_CO285),y)
121 TEXTADDR         = 0x60008000
122 MACHINE          = footbridge
123 INCDIR           = ebsa285
124 endif
125 
126 ifeq ($(CONFIG_ARCH_NEXUSPCI),y)
127 MACHINE          = nexuspci
128 endif
129 
130 ifeq ($(CONFIG_ARCH_SHARK),y)
131 MACHINE          = shark
132 endif
133 
134 ifeq ($(CONFIG_ARCH_SA1100),y)
135 MACHINE          = sa1100
136 endif
137 
138 ifeq ($(CONFIG_ARCH_L7200),y)
139 MACHINE          = l7200
140 endif
141 
142 ifeq ($(CONFIG_ARCH_INTEGRATOR),y)
143 MACHINE          = integrator
144 endif
145 
146 # Only set INCDIR if its not already defined above
147 # Grr, ?= doesn't work as all the other assignment operators do.  Make bug?
148 ifeq ($(origin INCDIR), undefined)
149 INCDIR          := $(MACHINE)
150 endif
151 
152 # If we have a machine-specific directory, then include it in the build.
153 MACHDIR         := arch/arm/mach-$(MACHINE)
154 ifeq ($(MACHDIR),$(wildcard $(MACHDIR)))
155 SUBDIRS         += $(MACHDIR)
156 CORE_FILES      := $(MACHDIR)/$(MACHINE).o $(CORE_FILES)
157 endif
158 
159 HEAD            := arch/arm/kernel/head-$(PROCESSOR).o \
160                    arch/arm/kernel/init_task.o
161 SUBDIRS         += arch/arm/kernel arch/arm/mm arch/arm/lib \
162                    arch/arm/nwfpe
163 CORE_FILES      := arch/arm/kernel/kernel.o arch/arm/mm/mm.o $(CORE_FILES)
164 LIBS            := arch/arm/lib/lib.o arch/arm/lib/lib.a $(LIBS) $(LIBGCC)
165 
166 ifeq ($(CONFIG_NWFPE),y)
167 LIBS            := arch/arm/nwfpe/math-emu.o $(LIBS)
168 endif
169 
170 ifeq ($(CONFIG_ARCH_ACORN),y)
171 SUBDIRS         += drivers/acorn
172 DRIVERS         += drivers/acorn/block/acorn-block.a
173 DRIVERS         += drivers/acorn/char/acorn-char.o
174 DRIVERS         += drivers/acorn/net/acorn-net.o
175 DRIVERS         += drivers/acorn/scsi/acorn-scsi.a
176 endif
177 
178 ifeq ($(CONFIG_ARCH_CLPS7500),y)
179 SUBDIRS         += drivers/acorn/char
180 DRIVERS         += drivers/acorn/char/acorn-char.o
181 endif
182 
183 MAKEBOOT         = $(MAKE) -C arch/$(ARCH)/boot
184 
185 # The following is a hack to get 'constants.h' up
186 # to date before starting compilation
187 
188 $(patsubst %, _dir_%, $(SUBDIRS)) init/main.o init/version.o : \
189         include/asm-arm/mach-types.h
190 
191 $(patsubst %, _dir_%, $(SUBDIRS)) : constants
192 
193 include/asm-arm/mach-types.h: arch/arm/tools/mach-types  \
194                               arch/arm/tools/gen-mach-types
195         @awk -f arch/arm/tools/gen-mach-types arch/arm/tools/mach-types > $@
196 
197 constants: dummy
198         @$(MAKE) -C arch/arm/lib constants.h
199 
200 symlinks: archsymlinks
201 
202 archsymlinks:
203         $(RM) include/asm-arm/arch include/asm-arm/proc
204         (cd include/asm-arm; ln -sf arch-$(INCDIR) arch; ln -sf proc-$(PROCESSOR) proc)
205 
206 vmlinux: arch/arm/vmlinux.lds
207 
208 arch/arm/vmlinux.lds: arch/arm/vmlinux-$(PROCESSOR).lds.in dummy
209         @sed 's/TEXTADDR/$(TEXTADDR)/' <$< >$@
210 
211 arch/arm/kernel arch/arm/mm arch/arm/lib: dummy
212         $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@)
213 
214 bzImage zImage zinstall Image bootpImage install: vmlinux
215         @$(MAKEBOOT) $@
216 
217 archmrproper:
218         $(RM) include/asm-arm/arch include/asm-arm/proc
219 
220 archclean:
221         @$(MAKEBOOT) clean
222         $(RM) arch/arm/lib/constants.h arch/arm/vmlinux.lds
223         $(RM) include/asm-arm/mach-types.h
224 
225 archdep: archsymlinks
226         @$(MAKEBOOT) dep
227 
228 # My testing targets (that short circuit a few dependencies)
229 zImg:;  @$(MAKEBOOT) zImage
230 Img:;   @$(MAKEBOOT) Image
231 i:;     @$(MAKEBOOT) install
232 zi:;    @$(MAKEBOOT) zinstall
233 
234 #
235 # Configuration targets.  Use these to select a
236 # configuration for your architecture
237 CFGS=   a5k_config              ebsa110_config          \
238         footbridge_config       rpc_config              \
239         brutus_config           victor_config           \
240         empeg_config            thinclient_config       \
241         assabet_config          lart_config             \
242         cerf_config             lusl7200_config 
243 
244 $(CFGS):
245         @( \
246         CFG=$(@:_config=); \
247         if [ -f arch/arm/def-configs/$$CFG ]; then \
248           $(RM) arch/arm/defconfig; \
249           cp arch/arm/def-configs/$$CFG arch/arm/defconfig; \
250           echo "*** Default configuration for $$CFG installed"; \
251           echo "*** Next, you may run 'make oldconfig'"; \
252         else \
253           echo "$$CFG does not exist"; \
254         fi; \
255         )

~ [ 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.