orphan
[debian/elilo] / Make.defaults
1 #
2 #  Copyright (C) 2001-2003 Hewlett-Packard Co.
3 #       Contributed by Stephane Eranian <eranian@hpl.hp.com>
4 #       Contributed by Chandramouli Narayanan<mouli@linux.intel.com>
5 #
6 # This file is part of ELILO, the LINUX EFI boot loader.
7 #
8 #  ELILO is free software; you can redistribute it and/or modify
9 #  it under the terms of the GNU General Public License as published by
10 #  the Free Software Foundation; either version 2, or (at your option)
11 #  any later version.
12 #
13 #  ELILO is distributed in the hope that it will be useful,
14 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 #  GNU General Public License for more details.
17 #
18 #  You should have received a copy of the GNU General Public License
19 #  along with ELILO; see the file COPYING.  If not, write to the Free
20 #  Software Foundation, 59 Temple Place - Suite 330, Boston, MA
21 #  02111-1307, USA.
22 #
23 # Please check out the elilo.txt for complete documentation on how
24 # to use this program.
25 #
26
27 #
28 # File system selection. At least one filesystem must be enabled
29 #
30 CONFIG_localfs=y
31 CONFIG_netfs=y
32
33 #
34 # WARNING WARNING WARNING
35 #
36 # Use this option with caution. This filesystem module does not
37 # support ext3 formatted partitions, i.e., it does not know how
38 # to recover from failures (ignores the log).
39 #
40 CONFIG_ext2fs=n
41
42 #
43 # Chooser selection(at least one must be defined)
44 #
45 CONFIG_chooser_simple=y
46 CONFIG_chooser_textmenu=y
47
48 #
49 # Enable IP-address based config file (elilo.conf) when netbooted
50 #
51 CONFIG_machspec_netconfig=y
52
53 #
54 # Indicate where the EFI include and libaries are.
55 # They are installed as part of the GNU-EFI package installation
56 #
57 EFIINC     = /usr/include/efi
58 GNUEFILIB  = /usr/lib
59 EFILIB     = /usr/lib
60 EFICRT0    = /usr/lib
61
62 CDIR    := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
63 TOPDIR  =
64
65 ARCH       = $(shell uname -m | sed s,i[3456789]86,ia32,)
66 INCDIR     = -I. -I$(TOPDIR) -I$(EFIINC) -I$(EFIINC)/$(ARCH) -I$(EFIINC)/protocol -I$(TOPDIR)/efi110
67 CPPFLAGS   = -DCONFIG_$(ARCH) 
68
69 OPTIMFLAGS = -O2 
70 DEBUGFLAGS = -Wall
71 CFLAGS     = $(OPTIMFLAGS) -fno-stack-protector -fno-strict-aliasing -fpic -fshort-wchar $(DEBUGFLAGS)
72 LDFLAGS    = -nostdlib -znocombreloc
73 INSTALL    = install
74
75 ifeq ($(CONFIG_machspec_netconfig),y)
76 CFLAGS += -DENABLE_MACHINE_SPECIFIC_NETCONFIG
77 endif
78
79 ifeq ($(CONFIG_localfs),y)
80 CFLAGS += -DCONFIG_LOCALFS
81 endif
82
83 ifeq ($(CONFIG_netfs),y)
84 CFLAGS += -DCONFIG_NETFS
85 endif
86
87 ifeq ($(CONFIG_ext2fs),y)
88 CFLAGS += -DCONFIG_EXT2FS
89 endif
90
91 ifeq ($(CONFIG_chooser_simple),y)
92 CFLAGS += -DCONFIG_CHOOSER_SIMPLE
93 endif
94
95 ifeq ($(CONFIG_chooser_textmenu),y)
96 CFLAGS += -DCONFIG_CHOOSER_TEXTMENU
97 endif
98
99 prefix          = /usr/bin/
100   # Redhat 8.0 ia32 gcc-3.x version is reported to produce working EFI binaries.
101   # Redhat 9.0 ia32 gcc-3.x version is reported to produce BAD binaries.
102 CC              = $(prefix)gcc
103 AS              = $(prefix)as
104 LD              = $(prefix)ld
105 AR              = $(prefix)ar
106 RANLIB          = $(prefix)ranlib
107 OBJCOPY         = $(prefix)objcopy
108
109 # Use Modified binutils that supports x86_64 using UEFI ABI
110 ifeq ($(ARCH), x86_64)
111         CFLAGS   += -DEFI_FUNCTION_WRAPPER
112         OBJCOPY   = /usr/bin/objcopy
113 endif
114
115 ifeq ($(ARCH),ia64)
116  GCC_VERSION=$(shell $(CROSS_COMPILE)$(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.')
117
118  ifneq ($(GCC_VERSION),2)
119         CFLAGS += -frename-registers
120  endif
121
122  # EFI specs allows only lower floating point partition to be used
123  CFLAGS += -mfixed-range=f32-f127
124 endif