1# Code size reduction.
2#
3CFLAGS		+= -fstrength-reduce -fomit-frame-pointer
4
5# Code size reduction.  gcc3 needs a different syntax to gcc2 if you
6# want to avoid spurious warnings.
7#
8CFLAGS		+= -falign-jumps=1 -falign-loops=1 -falign-functions=1
9
10# Use %rip-relative addressing wherever possible.
11#
12CFLAGS		+= -fpie
13
14# Force 64-bit code
15#
16CFLAGS		+= -m64
17ASFLAGS		+= --64
18LDFLAGS		+= -m elf_x86_64
19
20# EFI requires -fshort-wchar, and nothing else currently uses wchar_t
21#
22CFLAGS		+= -fshort-wchar
23
24# We need to undefine the default macro "i386" when compiling .S
25# files, otherwise ".arch i386" translates to ".arch 1"...
26#
27CFLAGS			+= -Ui386
28
29# x86_64-specific directories containing source files
30#
31SRCDIRS		+= arch/x86_64/prefix
32
33# Include common x86 Makefile
34#
35MAKEDEPS	+= arch/x86/Makefile
36include arch/x86/Makefile
37
38# Include platform-specific Makefile
39#
40MAKEDEPS	+= arch/x86_64/Makefile.$(PLATFORM)
41include arch/x86_64/Makefile.$(PLATFORM)
42