ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / sparc / Makefile
1 #
2 # sparc/Makefile
3 #
4 # Makefile for the architecture dependent flags and dependencies on the
5 # Sparc.
6 #
7 # Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu)
8 #
9
10 #
11 # Uncomment the first CFLAGS if you are doing kgdb source level
12 # debugging of the kernel to get the proper debugging information.
13
14 AS              := $(AS) -32
15 LDFLAGS         := -m elf32_sparc
16
17 #CFLAGS := $(CFLAGS) -g -pipe -fcall-used-g5 -fcall-used-g7
18 CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
19 AFLAGS := $(AFLAGS) -m32
20
21 #LDFLAGS_vmlinux = -N -Ttext 0xf0004000
22 #  Since 2.5.40, the first stage is left not btfix-ed.
23 #  Actual linking is done with "make image".
24 LDFLAGS_vmlinux = -r
25
26 head-y := arch/sparc/kernel/head.o arch/sparc/kernel/init_task.o
27 HEAD_Y := $(head-y)
28
29 core-y += arch/sparc/kernel/ arch/sparc/mm/ arch/sparc/math-emu/
30 libs-y += arch/sparc/prom/ arch/sparc/lib/
31
32 # Export what is needed by arch/sparc/boot/Makefile
33 # Renaming is done to avoid confusing pattern matching rules in 2.5.45 (multy-)
34 INIT_Y          := $(patsubst %/, %/built-in.o, $(init-y))
35 CORE_Y          := $(core-y)
36 CORE_Y          += kernel/ mm/ fs/ ipc/ security/ crypto/
37 CORE_Y          := $(patsubst %/, %/built-in.o, $(CORE_Y))
38 DRIVERS_Y       := $(patsubst %/, %/built-in.o, $(drivers-y))
39 NET_Y           := $(patsubst %/, %/built-in.o, $(net-y))
40 LIBS_Y1         := $(patsubst %/, %/lib.a, $(libs-y))
41 LIBS_Y2         := $(patsubst %/, %/built-in.o, $(libs-y))
42 LIBS_Y          := $(LIBS_Y1) $(LIBS_Y2)
43
44 ifdef CONFIG_KALLSYMS
45 kallsyms.o := .tmp_kallsyms2.o
46 endif
47
48 export INIT_Y CORE_Y DRIVERS_Y NET_Y LIBS_Y HEAD_Y kallsyms.o
49
50 # Default target
51 all: image
52
53 boot := arch/sparc/boot
54
55 image tftpboot.img: vmlinux
56         $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
57
58 archclean:
59         $(Q)$(MAKE) $(clean)=$(boot)
60
61 prepare: include/asm-$(ARCH)/asm_offsets.h
62
63 arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
64                                    include/config/MARKER
65
66 include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
67         $(call filechk,gen-asm-offsets)
68
69 CLEAN_FILES +=  include/asm-$(ARCH)/asm_offsets.h       \
70                 arch/$(ARCH)/kernel/asm-offsets.s       \
71                 arch/$(ARCH)/boot/System.map
72
73 # Don't use tabs in echo arguments.
74 define archhelp
75   echo  '* image        - kernel image ($(boot)/image)'
76   echo  '  tftpboot.img - image prepared for tftp'
77 endef