4 # Makefile for the architecture dependent flags and dependencies on the
7 # Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu)
10 # If the solaris /bin/sh wasn't so broken, I wouldn't need the following
15 # Uncomment the first CFLAGS if you are doing kgdb source level
16 # debugging of the kernel to get the proper debugging information.
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)
23 LDFLAGS := -m elf32_sparc
26 #CFLAGS := $(CFLAGS) -g -pipe -fcall-used-g5 -fcall-used-g7
28 CFLAGS := $(CFLAGS) -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
30 CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
31 AFLAGS := $(AFLAGS) -m32
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".
39 head-y := arch/sparc/kernel/head.o arch/sparc/kernel/init_task.o
42 core-y += arch/sparc/kernel/ arch/sparc/mm/ arch/sparc/math-emu/
43 libs-y += arch/sparc/prom/ arch/sparc/lib/
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))
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
59 boot := arch/sparc/boot
61 image tftpboot.img: vmlinux
62 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
65 $(Q)$(MAKE) $(clean)=$(boot)
67 prepare: include/asm-$(ARCH)/asm_offsets.h
69 arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
72 include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
73 $(call filechk,gen-asm-offsets)
75 CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h \
76 arch/$(ARCH)/kernel/asm-offsets.s
78 # Don't use tabs in echo arguments.
80 echo '* image - kernel image ($(boot)/image)'
81 echo ' tftpboot.img - image prepared for tftp'