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

Subversion Repositories or1k

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
#
2
# x86_64/Makefile
3
#
4
# This file is included by the global makefile so that you can add your own
5
# architecture-specific flags and dependencies. Remember to do have actions
6
# for "archclean" and "archdep" for cleaning up and making dependencies for
7
# this architecture
8
#
9
# This file is subject to the terms and conditions of the GNU General Public
10
# License.  See the file "COPYING" in the main directory of this archive
11
# for more details.
12
#
13
# Copyright (C) 1994 by Linus Torvalds
14
#
15
# 19990713  Artur Skawina 
16
#           Added '-march' and '-mpreferred-stack-boundary' support
17
# 20000913  Pavel Machek 
18
#           Converted for x86_64 architecture
19
# 20010105  Andi Kleen, add IA32 compiler.
20
#           ....and later removed it again....
21
#
22
# $Id: Makefile,v 1.1.1.1 2004-04-15 01:36:24 phoenix Exp $
23
 
24
#
25
# early bootup linking needs 32bit. You can either use real 32bit tools
26
# here or 64bit tools switch to 32bit mode.
27
#
28
IA32_CC := $(CROSS_COMPILE)gcc -m32 -O2 -fomit-frame-pointer -nostdinc -I $(HPATH)
29
IA32_LD := $(CROSS_COMPILE)ld -m elf_i386
30
IA32_AS := $(CROSS_COMPILE)gcc -m32 -Wa,--32 -D__ASSEMBLY__ -traditional -c -nostdinc -I $(HPATH)
31
IA32_OBJCOPY := $(CROSS_COMPILE)objcopy
32
IA32_CPP := $(CROSS_COMPILE)gcc -m32 -E
33
export IA32_CC IA32_LD IA32_AS IA32_OBJCOPY IA32_CPP
34
 
35
 
36
LD=$(CROSS_COMPILE)ld -m elf_x86_64
37
OBJCOPY=$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S
38
LDFLAGS=-e stext
39
LINKFLAGS =-T $(TOPDIR)/arch/x86_64/vmlinux.lds $(LDFLAGS)
40
 
41
check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then echo "$(1)"; else echo "$(2)"; fi)
42
 
43
CFLAGS += -mno-red-zone
44
CFLAGS += -mcmodel=kernel
45
CFLAGS += -pipe
46
CFLAGS += -fno-reorder-blocks
47
# needed for later gcc 3.1
48
CFLAGS += -finline-limit=2000
49
# needed for earlier gcc 3.1
50
CFLAGS += -fno-strength-reduce
51
CFLAGS += -Wno-sign-compare
52
#CFLAGS += -g
53
ifneq ($(CONFIG_X86_REMOTE_DEBUG),y)
54
CFLAGS += -fno-asynchronous-unwind-tables
55
endif
56
# this is needed right now for the 32bit ioctl code
57
CFLAGS += $(call check_gcc,-fno-unit-at-a-time,)
58
 
59
ifdef CONFIG_MK8
60
CFLAGS += $(call check_gcc,-march=k8,)
61
endif
62
ifdef CONFIG_MPSC
63
CFLAGS += $(call check_gcc,-march=nocona,)
64
endif
65
 
66
HEAD := arch/x86_64/kernel/head.o arch/x86_64/kernel/head64.o arch/x86_64/kernel/init_task.o
67
 
68
SUBDIRS := arch/x86_64/tools $(SUBDIRS) arch/x86_64/kernel arch/x86_64/mm arch/x86_64/lib
69
CORE_FILES := arch/x86_64/kernel/kernel.o $(CORE_FILES)
70
CORE_FILES +=  arch/x86_64/mm/mm.o
71
LIBS := $(TOPDIR)/arch/x86_64/lib/lib.a $(LIBS)
72
 
73
ifdef CONFIG_IA32_EMULATION
74
SUBDIRS += arch/x86_64/ia32
75
CORE_FILES += arch/x86_64/ia32/ia32.o
76
endif
77
 
78
ifdef CONFIG_HOSTFS
79
SUBDIRS += arch/x86_64/hostfs
80
core-$(CONFIG_HOSTFS) += arch/x86_64/hostfs/hostfs.o
81
endif
82
 
83
CORE_FILES += $(core-y)
84
 
85
arch/x86_64/tools: dummy
86
        $(MAKE) linuxsubdirs SUBDIRS=arch/x86_64/tools
87
 
88
arch/x86_64/kernel: dummy
89
        $(MAKE) linuxsubdirs SUBDIRS=arch/x86_64/kernel
90
 
91
arch/x86_64/mm: dummy
92
        $(MAKE) linuxsubdirs SUBDIRS=arch/x86_64/mm
93
 
94
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
95
 
96
vmlinux: arch/x86_64/vmlinux.lds
97
 
98
FORCE: ;
99
 
100
.PHONY: zImage bzImage compressed zlilo bzlilo zdisk bzdisk install \
101
                clean archclean archmrproper archdep checkoffset
102
 
103
checkoffset: FORCE
104
        make -C arch/$(ARCH)/tools $(TOPDIR)/include/asm-x86_64/offset.h
105
 
106
bzImage: checkoffset vmlinux
107
        @$(MAKEBOOT) bzImage
108
 
109
bzImage-padded: checkoffset vmlinux
110
        @$(MAKEBOOT) bzImage-padded
111
 
112
tmp:
113
        @$(MAKEBOOT) BOOTIMAGE=bzImage zlilo
114
 
115
bzlilo: checkoffset vmlinux
116
        @$(MAKEBOOT) BOOTIMAGE=bzImage zlilo
117
 
118
bzdisk: checkoffset vmlinux
119
        @$(MAKEBOOT) BOOTIMAGE=bzImage zdisk
120
 
121
install: checkoffset vmlinux
122
        @$(MAKEBOOT) BOOTIMAGE=bzImage install
123
 
124
archclean:
125
        @$(MAKEBOOT) clean
126
        @$(MAKE) -C $(TOPDIR)/arch/x86_64/tools clean
127
 
128
archmrproper:
129
        rm -f $(TOPDIR)/arch/x86_64/tools/offset.h
130
        rm -f $(TOPDIR)/arch/x86_64/tools/offset.tmp
131
        rm -f $(TOPDIR)/include/asm-x86_64/offset.h
132
 
133
archdep:
134
        @$(MAKE) -C $(TOPDIR)/arch/x86_64/tools all
135
        @$(MAKEBOOT) dep

powered by: WebSVN 2.1.0

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