2 # Copyright (C) 2001-2003 Hewlett-Packard Co.
3 # Contributed by Stephane Eranian <eranian@hpl.hp.com>
5 # This file is part of ELILO, the LINUX EFI boot loader.
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)
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.
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
22 # Please check out the elilo.txt for complete documentation on how
23 # to use this program.
27 # File system selection. At least one filesystem must be enabled
33 # WARNING WARNING WARNING
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).
42 # Chooser selection(at least one must be defined)
44 CONFIG_chooser_simple=y
45 CONFIG_chooser_textmenu=y
48 # Enable IP-address based config file (elilo.conf) when netbooted
50 CONFIG_machspec_netconfig=y
53 # Indicate where the EFI include and libaries are.
54 # They are installed as part of the GNU-EFI package installation
56 EFIINC = /usr/include/efi
61 CDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
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)
70 CFLAGS = $(OPTIMFLAGS) -fpic -fshort-wchar $(DEBUGFLAGS)
74 ifeq ($(CONFIG_machspec_netconfig),y)
75 CFLAGS += -DENABLE_MACHINE_SPECIFIC_NETCONFIG
78 ifeq ($(CONFIG_localfs),y)
79 CFLAGS += -DCONFIG_LOCALFS
82 ifeq ($(CONFIG_netfs),y)
83 CFLAGS += -DCONFIG_NETFS
86 ifeq ($(CONFIG_ext2fs),y)
87 CFLAGS += -DCONFIG_EXT2FS
90 ifeq ($(CONFIG_chooser_simple),y)
91 CFLAGS += -DCONFIG_CHOOSER_SIMPLE
94 ifeq ($(CONFIG_chooser_textmenu),y)
95 CFLAGS += -DCONFIG_CHOOSER_TEXTMENU
105 RANLIB = $(prefix)ranlib
106 OBJCOPY = $(prefix)objcopy
108 GCC_VERSION=$(shell $(CROSS_COMPILE)$(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.')
110 ifneq ($(GCC_VERSION),2)
111 CFLAGS += -frename-registers
114 # EFI specs allows only lower floating point partition to be used
116 # Redhat 8.0 gcc-3.x version is reported to produce working EFI binaries.
117 # Redhat 9.0 gcc-3.x version is reported to produce BAD binaries.
119 CFLAGS += -mfixed-range=f32-f127
127 RANLIB = $(prefix)ranlib
128 OBJCOPY = $(prefix)objcopy