1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
#
# Copyright (c) 1999-2007 Hewlett-Packard Development Company, L.P.
# Contributed by David Mosberger <davidm@hpl.hp.com>
# Contributed by Stephane Eranian <eranian@hpl.hp.com>
#
# This file is part of the gnu-efi package.
#
# GNU-EFI is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU-EFI is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU-EFI; see the file COPYING. If not, write to the Free
# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#
#
# Where to install the package. GNU-EFI will create and access
# lib and include under the root
#
INSTALLROOT=/usr/local
TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
HOSTARCH = $(shell uname -m | sed s,i[3456789]86,ia32,)
ARCH := $(shell uname -m | sed s,i[3456789]86,ia32,)
INCDIR = -I$(SRCDIR) -I$(TOPDIR)/inc -I$(TOPDIR)/inc/$(ARCH) -I$(TOPDIR)/inc/protocol
CPPFLAGS = -DCONFIG_$(ARCH)
CFLAGS = $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants
ASFLAGS = $(ARCH3264)
LDFLAGS = -nostdlib
INSTALL = install
prefix = /usr/bin/
CC = $(prefix)gcc
AS = $(prefix)as
LD = $(prefix)ld
AR = $(prefix)ar
RANLIB = $(prefix)ranlib
OBJCOPY = $(prefix)objcopy
ifeq ($(ARCH),ia64)
CFLAGS += -mfixed-range=f32-f127
endif
ifeq ($(ARCH),x86_64)
CFLAGS += -DEFI_FUNCTION_WRAPPER -mno-red-zone
endif
ifeq ($(ARCH), ia32)
ifeq ($(HOSTARCH), x86_64)
ARCH3264 = -m32
endif
endif
ifeq ($(ARCH), x86_64)
ifeq ($(HOSTARCH), ia32)
ARCH3264 = -m64
endif
endif
|