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