* add p cc
[mascara-docs.git] / i386 / linux / linux-2.3.21 / arch / sparc64 / Makefile
blob1216a3a4f44f41b728aaef26cc0db6fc1d9fcab3
1 # $Id: Makefile,v 1.40 1999/08/19 02:31:57 davem Exp $
2 # sparc64/Makefile
4 # Makefile for the architecture dependent flags and dependencies on the
5 # 64-bit Sparc.
7 # Copyright (C) 1996,1998 David S. Miller (davem@caip.rutgers.edu)
8 # Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
11 # If the solaris /bin/sh wasn't so broken, I wouldn't need the following
12 # line...
13 SHELL =/bin/bash
15 CC := sparc64-linux-gcc -D__KERNEL__ -I$(TOPDIR)/include
17 CC_HAS_ARGS := $(shell if echo "$(CC)" | grep '\(__KERNEL__\| \)' > /dev/null; then echo y; else echo n; fi)
18 IS_EGCS := $(shell if $(CC) -m64 -mcmodel=medlow -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)
21 ifneq ($(CC_HAS_ARGS),y)
22 MAKEOVERRIDES := $(shell echo "$(MAKEOVERRIDES)" | sed 's CC=$(CC) CC=$(CC)\\\ -D__KERNEL__\\\ -I$(TOPDIR)/include ')
23 override CC := $(CC) -D__KERNEL__ -I$(TOPDIR)/include
24 endif
26 ifneq ($(NEW_GAS),y)
27 AS = sparc64-linux-as
28 LD = sparc64-linux-ld
29 NM = sparc64-linux-nm
30 AR = sparc64-linux-ar
31 RANLIB = sparc64-linux-ranlib
32 else
33 AS := $(AS) -64
34 LD := $(LD) -m elf64_sparc
35 endif
36 ELFTOAOUT = elftoaout
39 # Uncomment the first CFLAGS if you are doing kgdb source level
40 # debugging of the kernel to get the proper debugging information.
42 #CFLAGS := $(CFLAGS) -g -pipe -fcall-used-g5 -fcall-used-g7
43 ifneq ($(IS_EGCS),y)
44 CFLAGS := $(CFLAGS) -pipe -mno-fpu -mtune=ultrasparc -mmedlow \
45 -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare
46 else
47 CFLAGS := $(CFLAGS) -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \
48 -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare
49 AFLAGS += -m64 -mcpu=ultrasparc
50 endif
52 # Uncomment this to get spinlock/rwlock debugging on SMP.
53 # DEBUG_SPINLOCK = 1
55 ifdef CONFIG_SMP
56 ifdef DEBUG_SPINLOCK
57 CFLAGS += -DSPIN_LOCK_DEBUG
58 AFLAGS += -DSPIN_LOCK_DEBUG
59 endif
60 endif
62 LINKFLAGS = -T arch/sparc64/vmlinux.lds
64 HEAD := arch/sparc64/kernel/head.o arch/sparc64/kernel/init_task.o
66 SUBDIRS := $(SUBDIRS) arch/sparc64/kernel arch/sparc64/lib arch/sparc64/mm \
67 arch/sparc64/prom
69 ifneq ($(CONFIG_SOLARIS_EMUL),n)
70 SUBDIRS += arch/sparc64/solaris
71 endif
73 SUBDIRS += arch/sparc64/math-emu
75 CORE_FILES := arch/sparc64/kernel/kernel.o arch/sparc64/mm/mm.o $(CORE_FILES)
77 ifeq ($(CONFIG_SOLARIS_EMUL),y)
78 CORE_FILES += arch/sparc64/solaris/solaris.o
79 endif
81 CORE_FILES += arch/sparc64/math-emu/math-emu.o
83 LIBS := $(TOPDIR)/lib/lib.a $(LIBS) $(TOPDIR)/arch/sparc64/prom/promlib.a \
84 $(TOPDIR)/arch/sparc64/lib/lib.a
86 vmlinux.aout: vmlinux
87 $(ELFTOAOUT) -o $(TOPDIR)/vmlinux.aout $(TOPDIR)/vmlinux
89 archclean:
90 rm -f $(TOPDIR)/vmlinux.aout
92 archmrproper:
94 archdep:
96 check_asm:
97 $(MAKE) -C arch/sparc64/kernel check_asm
99 tftpboot.img:
100 $(MAKE) -C arch/sparc64/boot tftpboot.img