OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [arm/] [Makefile] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
#
2
# arch/arm/Makefile
3
#
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.
7
#
8
# Copyright (C) 1995-2001 by Russell King
9
 
10
LINKFLAGS       :=-p -X -T arch/arm/vmlinux.lds
11
OBJCOPYFLAGS    :=-O binary -R .note -R .comment -S
12
GZFLAGS         :=-9
13
CFLAGS          +=-Uarm -fno-common -pipe
14
 
15
ifeq ($(CONFIG_FRAME_POINTER),y)
16
CFLAGS          :=$(CFLAGS:-fomit-frame-pointer=-mapcs -mno-sched-prolog)
17
endif
18
 
19
CFLAGS          :=$(CFLAGS:-O2=-Os)
20
 
21
ifeq ($(CONFIG_DEBUG_INFO),y)
22
CFLAGS          +=-g
23
endif
24
 
25
# Select CPU dependent flags.  Note that order of declaration is important;
26
# the options further down the list override previous items.
27
#
28
# Note!  For APCS-26 YOU MUST HAVE AN APCS-26 LIBGCC.A
29
#
30
apcs-y                          :=-mapcs-32
31
apcs-$(CONFIG_CPU_26)           :=-mapcs-26 -mcpu=arm3 -Os
32
 
33
# This selects which instruction set is used.
34
# Note that GCC is lame - it doesn't numerically define an
35
# architecture version macro, but instead defines a whole
36
# series of macros.
37
arch-y                          :=
38
arch-$(CONFIG_CPU_32v3)         :=-D__LINUX_ARM_ARCH__=3 -march=armv3
39
arch-$(CONFIG_CPU_32v4)         :=-D__LINUX_ARM_ARCH__=4 -march=armv4
40
arch-$(CONFIG_CPU_32v5)         :=-D__LINUX_ARM_ARCH__=5 -march=armv5
41
 
42
# This selects how we optimise for the processor.
43
tune-y                          :=
44
tune-$(CONFIG_CPU_ARM610)       :=-mtune=arm610
45
tune-$(CONFIG_CPU_ARM710)       :=-mtune=arm710
46
tune-$(CONFIG_CPU_ARM720T)      :=-mtune=arm7tdmi
47
tune-$(CONFIG_CPU_ARM920T)      :=-mtune=arm9tdmi
48
tune-$(CONFIG_CPU_ARM922T)      :=-mtune=arm9tdmi
49
tune-$(CONFIG_CPU_ARM926T)      :=-mtune=arm9tdmi
50
tune-$(CONFIG_CPU_SA110)        :=-mtune=strongarm110
51
tune-$(CONFIG_CPU_SA1100)       :=-mtune=strongarm1100
52
 
53
CFLAGS_BOOT     :=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Uarm
54
CFLAGS          +=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Uarm
55
AFLAGS          +=$(apcs-y) $(arch-y) -mno-fpu -msoft-float
56
 
57
ifeq ($(CONFIG_CPU_26),y)
58
PROCESSOR       := armo
59
  ifeq ($(CONFIG_ROM_KERNEL),y)
60
    DATAADDR     = 0x02080000
61
    TEXTADDR     = 0x03800000
62
    LDSCRIPT     = arch/arm/vmlinux-armo-rom.lds.in
63
  else
64
    TEXTADDR     = 0x02080000
65
    LDSCRIPT     = arch/arm/vmlinux-armo.lds.in
66
  endif
67
endif
68
 
69
ifeq ($(CONFIG_CPU_32),y)
70
PROCESSOR        = armv
71
TEXTADDR         = 0xC0008000
72
LDSCRIPT         = arch/arm/vmlinux-armv.lds.in
73
endif
74
 
75
ifeq ($(CONFIG_ARCH_ARCA5K),y)
76
MACHINE          = arc
77
endif
78
 
79
ifeq ($(CONFIG_ARCH_RPC),y)
80
MACHINE          = rpc
81
endif
82
 
83
ifeq ($(CONFIG_ARCH_EBSA110),y)
84
MACHINE          = ebsa110
85
CFLAGS_3c589_cs :=-DISA_SIXTEEN_BIT_PERIPHERAL
86
export CFLAGS_3c589_cs
87
endif
88
 
89
ifeq ($(CONFIG_ARCH_CLPS7500),y)
90
MACHINE          = clps7500
91
INCDIR           = cl7500
92
endif
93
 
94
ifeq ($(CONFIG_ARCH_RISCSTATION),y)
95
MACHINE          = riscstation
96
endif
97
 
98
ifeq ($(CONFIG_FOOTBRIDGE),y)
99
MACHINE          = footbridge
100
INCDIR           = ebsa285
101
endif
102
 
103
ifeq ($(CONFIG_ARCH_CO285),y)
104
TEXTADDR         = 0x60008000
105
MACHINE          = footbridge
106
INCDIR           = ebsa285
107
endif
108
 
109
ifeq ($(CONFIG_ARCH_FTVPCI),y)
110
MACHINE          = ftvpci
111
INCDIR           = nexuspci
112
endif
113
 
114
ifeq ($(CONFIG_ARCH_TBOX),y)
115
MACHINE          = tbox
116
endif
117
 
118
ifeq ($(CONFIG_ARCH_SHARK),y)
119
MACHINE          = shark
120
endif
121
 
122
ifeq ($(CONFIG_ARCH_SA1100),y)
123
ifeq ($(CONFIG_SA1111),y)
124
# SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory
125
TEXTADDR         = 0xc0208000
126
endif
127
MACHINE          = sa1100
128
endif
129
 
130
ifeq ($(CONFIG_ARCH_L7200),y)
131
MACHINE          = l7200
132
endif
133
 
134
ifeq ($(CONFIG_ARCH_INTEGRATOR),y)
135
MACHINE          = integrator
136
endif
137
 
138
ifeq ($(CONFIG_ARCH_AT91RM9200),y)
139
MACHINE          = at91rm9200
140
endif
141
 
142
ifeq ($(CONFIG_ARCH_MX1ADS),y)
143
MACHINE          = mx1ads
144
endif
145
 
146
ifeq ($(CONFIG_ARCH_CAMELOT),y)
147
MACHINE          = epxa
148
endif
149
 
150
ifeq ($(CONFIG_ARCH_CLPS711X),y)
151
TEXTADDR         = 0xc0028000
152
MACHINE          = clps711x
153
endif
154
 
155
ifeq ($(CONFIG_ARCH_FORTUNET),y)
156
TEXTADDR         = 0xc0208000
157
endif
158
 
159
ifeq ($(CONFIG_ARCH_ANAKIN),y)
160
MACHINE          = anakin
161
endif
162
 
163
ifeq ($(CONFIG_ARCH_OMAHA),y)
164
MACHINE                = omaha
165
endif
166
 
167
export  MACHINE PROCESSOR TEXTADDR GZFLAGS CFLAGS_BOOT OBJCOPYFLAGS
168
 
169
# Only set INCDIR if its not already defined above
170
# Grr, ?= doesn't work as all the other assignment operators do.  Make bug?
171
ifeq ($(origin INCDIR), undefined)
172
INCDIR          :=$(MACHINE)
173
endif
174
 
175
ifeq ($(origin DATAADDR), undefined)
176
DATAADDR        := .
177
endif
178
 
179
# If we have a machine-specific directory, then include it in the build.
180
MACHDIR         := arch/arm/mach-$(MACHINE)
181
ifeq ($(MACHDIR),$(wildcard $(MACHDIR)))
182
SUBDIRS         += $(MACHDIR)
183
CORE_FILES      := $(MACHDIR)/$(MACHINE).o $(CORE_FILES)
184
endif
185
 
186
HEAD            :=arch/arm/kernel/head-$(PROCESSOR).o \
187
                  arch/arm/kernel/init_task.o
188
SUBDIRS         +=arch/arm/kernel arch/arm/mm arch/arm/lib arch/arm/nwfpe
189
CORE_FILES      :=arch/arm/kernel/kernel.o arch/arm/mm/mm.o $(CORE_FILES)
190
LIBS            :=arch/arm/lib/lib.a $(LIBS)
191
 
192
ifeq ($(CONFIG_FPE_NWFPE),y)
193
LIBS            :=arch/arm/nwfpe/math-emu.o $(LIBS)
194
endif
195
 
196
# Only include fastfpe if it is part of the kernel tree.
197
FASTFPE         :=arch/arm/fastfpe
198
ifeq ($(FASTFPE),$(wildcard $(FASTFPE)))
199
SUBDIRS         +=$(FASTFPE)
200
ifeq ($(CONFIG_FPE_FASTFPE),y)
201
LIBS            :=arch/arm/fastfpe/fast-math-emu.o $(LIBS)
202
endif
203
endif
204
 
205
ifeq ($(findstring y,$(CONFIG_USB_OHCI_SA1111) $(CONFIG_USB_OHCI_AT91)),y)
206
   SUBDIRS      +=arch/arm/common
207
   CORE_FILES   +=arch/arm/common/nopci.o
208
endif
209
 
210
ifeq ($(findstring y,$(CONFIG_ARCH_CLPS7500) $(CONFIG_ARCH_L7200)),y)
211
SUBDIRS         +=drivers/acorn/char
212
DRIVERS         +=drivers/acorn/char/acorn-char.o
213
endif
214
 
215
ifeq ($(CONFIG_ARCH_RISCSTATION),y)
216
SUBDIRS         +=drivers/acorn/char
217
DRIVERS         +=drivers/acorn/char/acorn-char.o
218
endif
219
 
220
MAKEBOOT         =$(MAKE) -C arch/$(ARCH)/boot
221
MAKETOOLS        =$(MAKE) -C arch/$(ARCH)/tools
222
 
223
# The following is a hack to get 'constants.h' up
224
# to date before starting compilation
225
 
226
$(patsubst %,_dir_%, $(SUBDIRS)): maketools
227
$(patsubst %,_modsubdir_%,$(MOD_DIRS)): maketools
228
 
229
symlinks: include/asm-arm/.arch include/asm-arm/.proc
230
 
231
#       Update machine arch and proc symlinks if something which affects
232
#       them changed.  We use .arch and .proc to indicate when they were
233
#       updated last, otherwise make uses the target directory mtime.
234
 
235
include/asm-arm/.arch: $(wildcard include/config/arch/*.h)
236
ifneq ("$(INCDIR)","")
237
        @echo '  Making asm-arm/arch -> asm-arm/arch-$(INCDIR) symlink'
238
        @rm -f include/asm-arm/arch
239
        @ln -sf arch-$(INCDIR) include/asm-arm/arch
240
        @touch $@
241
else
242
        @echo '  No architecture defined.  You may want to use a pre-packaged config.  make a5k_config, ebsa110_config, footbridge_config, etc.'
243
endif
244
 
245
include/asm-arm/.proc: $(wildcard include/config/cpu/32.h) $(wildcard include/config/cpu/26.h)
246
ifneq ("$(INCDIR)","")
247
        @echo '  Making asm-arm/proc -> asm-arm/proc-$(PROCESSOR) symlink'
248
        @rm -f include/asm-arm/proc
249
        @ln -sf proc-$(PROCESSOR) include/asm-arm/proc
250
        @touch $@
251
else
252
        @echo '  No architecture defined.  You may want to use a pre-packaged config.  make a5k_config, ebsa110_config, footbridge_config, etc.'
253
endif
254
 
255
.PHONY: maketools
256
maketools: include/asm-arm/.arch include/asm-arm/.proc \
257
        include/asm-arm/constants.h include/linux/version.h checkbin
258
        @$(MAKETOOLS)
259
 
260
vmlinux: arch/arm/vmlinux.lds
261
 
262
arch/arm/vmlinux.lds: arch/arm/Makefile $(LDSCRIPT) \
263
        $(wildcard include/config/cpu/32.h) \
264
        $(wildcard include/config/cpu/26.h) \
265
        $(wildcard include/config/arch/*.h)
266
        @echo '  Generating $@'
267
        @sed 's/TEXTADDR/$(TEXTADDR)/;s/DATAADDR/$(DATAADDR)/' $(LDSCRIPT) >$@
268
 
269
arch/arm/kernel arch/arm/mm arch/arm/lib: dummy
270
        $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@)
271
 
272
bzImage zImage zinstall Image bootpImage install: vmlinux
273
        @$(MAKEBOOT) $@
274
 
275
CLEAN_FILES     += \
276
        arch/arm/vmlinux.lds
277
 
278
MRPROPER_FILES  += \
279
        arch/arm/tools/constants.h* \
280
        include/asm-arm/arch include/asm-arm/.arch \
281
        include/asm-arm/proc include/asm-arm/.proc \
282
        include/asm-arm/constants.h* \
283
        include/asm-arm/mach-types.h
284
 
285
# We use MRPROPER_FILES and CLEAN_FILES now
286
archmrproper: FORCE
287
        @/bin/true
288
 
289
archclean: FORCE
290
        @$(MAKEBOOT) clean
291
 
292
archdep: scripts/mkdep symlinks
293
        @$(MAKETOOLS) dep
294
        @$(MAKEBOOT) dep
295
 
296
# Ensure this is ld "2.9.5" or later
297
NEW_LINKER      := $(shell $(LD) --gc-sections --version >/dev/null 2>&1; echo $$?)
298
 
299
ifneq ($(NEW_LINKER),0)
300
checkbin: FORCE
301
        @echo '*** ${VERSION}.${PATCHLEVEL} kernels no longer build correctly with old versions of binutils.'
302
        @echo '*** Please upgrade your binutils to 2.9.5.'
303
        @false
304
else
305
checkbin: FORCE
306
        @true
307
endif
308
 
309
.PHONY: FORCE
310
 
311
# My testing targets (that short circuit a few dependencies)
312
zImg:;  @$(MAKEBOOT) zImage
313
Img:;   @$(MAKEBOOT) Image
314
i:;     @$(MAKEBOOT) install
315
zi:;    @$(MAKEBOOT) zinstall
316
bp:;    @$(MAKEBOOT) bootpImage
317
 
318
#
319
# Configuration targets.  Use these to select a
320
# configuration for your architecture
321
%_config:
322
        @( \
323
        CFG=$(@:_config=); \
324
        if [ -f arch/arm/def-configs/$$CFG ]; then \
325
          [ -f .config ] && mv -f .config .config.old; \
326
          cp arch/arm/def-configs/$$CFG .config; \
327
          echo "*** Default configuration for $$CFG installed"; \
328
          echo "*** Next, you may run 'make oldconfig'"; \
329
        else \
330
          echo "$$CFG does not exist"; \
331
        fi; \
332
        )

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.