move gbp.conf to debian/
[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 HOSTARCH   = $(shell dpkg-architecture -qDEB_BUILD_ARCH | sed s,i[3456789]86,ia32,)
66 ARCH       := $(shell dpkg-architecture -qDEB_BUILD_ARCH | sed s,i[3456789]86,ia32,)
67 INCDIR     = -I. -I$(TOPDIR) -I$(EFIINC) -I$(EFIINC)/$(ARCH) -I$(EFIINC)/protocol -I$(TOPDIR)/efi110
68 CPPFLAGS   = -DCONFIG_$(ARCH) 
69
70 OPTIMFLAGS = -O2 
71 DEBUGFLAGS = -Wall
72 CFLAGS     = $(ARCH3264) $(OPTIMFLAGS) -fpic -fshort-wchar $(DEBUGFLAGS)
73 ASFLAGS    = $(ARCH3264)
74 LDFLAGS    = -nostdlib -znocombreloc
75 INSTALL    = install
76
77 ifeq ($(CONFIG_machspec_netconfig),y)
78 CFLAGS += -DENABLE_MACHINE_SPECIFIC_NETCONFIG
79 endif
80
81 ifeq ($(CONFIG_localfs),y)
82 CFLAGS += -DCONFIG_LOCALFS
83 endif
84
85 ifeq ($(CONFIG_netfs),y)
86 CFLAGS += -DCONFIG_NETFS
87 endif
88
89 ifeq ($(CONFIG_ext2fs),y)
90 CFLAGS += -DCONFIG_EXT2FS
91 endif
92
93 ifeq ($(CONFIG_chooser_simple),y)
94 CFLAGS += -DCONFIG_CHOOSER_SIMPLE
95 endif
96
97 ifeq ($(CONFIG_chooser_textmenu),y)
98 CFLAGS += -DCONFIG_CHOOSER_TEXTMENU
99 endif
100
101 prefix          = /usr/bin/
102   # Redhat 8.0 ia32 gcc-3.x version is reported to produce working EFI binaries.
103   # Redhat 9.0 ia32 gcc-3.x version is reported to produce BAD binaries.
104 CC              = $(prefix)gcc
105 AS              = $(prefix)as
106 LD              = $(prefix)ld
107 AR              = $(prefix)ar
108 RANLIB          = $(prefix)ranlib
109 OBJCOPY         = $(prefix)objcopy
110
111 # Use Modified binutils that supports x86_64 using UEFI ABI
112 ifeq ($(ARCH), x86_64)
113   ifeq ($(HOSTARCH), ia32)
114         ARCH3264 = -m64
115         LD3264 = -melf_x86_64
116
117         GNUEFILIB := $(GNUEFILIB)64
118         EFILIB    := $(EFILIB)64
119         EFICRT0   := $(EFICRT0)64
120   endif
121
122         CFLAGS   += -DEFI_FUNCTION_WRAPPER
123         OBJCOPY   = /usr/bin/objcopy
124 endif
125
126 ifeq ($(ARCH), ia32)
127   ifeq ($(HOSTARCH), x86_64)
128         ARCH3264 = -m32
129         LD3264 = -melf_i386
130
131         GNUEFILIB := /emul/ia32-linux$(GNUEFILIB)
132         EFILIB    := /emul/ia32-linux$(EFILIB)
133         EFICRT0   := /emul/ia32-linux$(EFICRT0)
134   endif
135 endif
136
137 ifeq ($(ARCH),ia64)
138  GCC_VERSION=$(shell $(CROSS_COMPILE)$(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.')
139
140  ifneq ($(GCC_VERSION),2)
141         CFLAGS += -frename-registers
142  endif
143
144  # EFI specs allows only lower floating point partition to be used
145  CFLAGS += -mfixed-range=f32-f127
146 endif