usr: Create objectfile for usr filesystem using .incbin
[linux-flexiantxendom0-3.2.10.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 # If the solaris /bin/sh wasn't so broken, I wouldn't need the following
11 # line...
12 SHELL  =/bin/bash
13
14 #
15 # Uncomment the first CFLAGS if you are doing kgdb source level
16 # debugging of the kernel to get the proper debugging information.
17
18 IS_EGCS := $(shell if $(CC) -m32 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo y; else echo n; fi; )
19 NEW_GAS := $(shell if $(LD) --version 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi)
20
21 ifeq ($(NEW_GAS),y)
22 AS              := $(AS) -32
23 LDFLAGS         := -m elf32_sparc
24 endif
25
26 #CFLAGS := $(CFLAGS) -g -pipe -fcall-used-g5 -fcall-used-g7
27 ifneq ($(IS_EGCS),y)
28 CFLAGS := $(CFLAGS) -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
29 else
30 CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
31 AFLAGS := $(AFLAGS) -m32
32 endif
33
34 #LDFLAGS_vmlinux = -N -Ttext 0xf0004000
35 #  Since 2.5.40, the first stage is left not btfix-ed.
36 #  Actual linking is done with "make image".
37 LDFLAGS_vmlinux = -r
38
39 head-y := arch/sparc/kernel/head.o arch/sparc/kernel/init_task.o
40 HEAD_Y := $(head-y)
41
42 core-y += arch/sparc/kernel/ arch/sparc/mm/ arch/sparc/math-emu/
43 libs-y += arch/sparc/prom/ arch/sparc/lib/
44
45 # Export what is needed by arch/sparc/boot/Makefile
46 # Renaming is done to avoid confusing pattern matching rules in 2.5.45 (multy-)
47 INIT_Y          := $(patsubst %/, %/built-in.o, $(init-y))
48 CORE_Y          := $(core-y)
49 CORE_Y          += kernel/ mm/ fs/ ipc/ security/ crypto/
50 CORE_Y          := $(patsubst %/, %/built-in.o, $(CORE_Y))
51 DRIVERS_Y       := $(patsubst %/, %/built-in.o, $(drivers-y))
52 NET_Y           := $(patsubst %/, %/built-in.o, $(net-y))
53 LIBS_Y          := $(patsubst %/, %/lib.a, $(libs-y))
54 export INIT_Y CORE_Y DRIVERS_Y NET_Y LIBS_Y HEAD_Y
55
56 # Default target
57 all: image
58
59 boot := arch/sparc/boot
60
61 image tftpboot.img: vmlinux
62         $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
63
64 archclean:
65         $(Q)$(MAKE) $(clean)=$(boot)
66
67 prepare: include/asm-$(ARCH)/asm_offsets.h
68
69 arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
70                                    include/config/MARKER
71
72 include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
73         $(call filechk,gen-asm-offsets)
74
75 CLEAN_FILES +=  include/asm-$(ARCH)/asm_offsets.h       \
76                 arch/$(ARCH)/kernel/asm-offsets.s
77
78 # Don't use tabs in echo arguments.
79 define archhelp
80   echo  '* image        - kernel image ($(boot)/image)'
81   echo  '  tftpboot.img - image prepared for tftp'
82 endef