#
# Copyright (C) 2001-2003 Hewlett-Packard Co.
# Contributed by Stephane Eranian <eranian@hpl.hp.com>
+# Contributed by Fenghua Yu<fenghua.yu@intel.com>
+# Contributed by Chandramouli Narayanan<mouli@linux.intel.com>
#
# This file is part of ELILO, the LINUX EFI boot loader.
#
# to use this program.
#
-include Make.defaults
-TOPDIR=.
+SRCDIR = .
+
+VPATH = $(SRCDIR)
+
+include $(SRCDIR)/Make.defaults
+TOPDIR = $(SRCDIR)
CRTOBJS = $(EFICRT0)/crt0-efi-$(ARCH).o
LDSCRIPT = $(EFICRT0)/elf_$(ARCH)_efi.lds
LDFLAGS += -T $(LDSCRIPT) -shared -Bsymbolic -L$(EFILIB) -L$(GNUEFILIB) $(CRTOBJS)
-LOADLIBES = -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name)
+LOADLIBES = -lefi -lgnuefi $(shell $(CC) $(ARCH3264) -print-libgcc-file-name)
FORMAT = efi-app-$(ARCH)
FILESYSTEM =
SUBDIRS += ia32
endif
+ifeq ($(ARCH),x86_64)
+SUBDIRS += x86_64
+endif
+
FILES = elilo.o getopt.o strops.o loader.o \
fileops.o util.o vars.o alloc.o chooser.o \
config.o initrd.o alternate.o bootparams.o \
- gunzip.o fs/fs.o \
+ gunzip.o console.o fs/fs.o \
choosers/choosers.o \
devschemes/devschemes.o \
$(ARCH)/sysdeps.o \
chooser.o : Make.defaults
$(SUBDIRS): dummy
- $(MAKE) -C $@
+ mkdir -p $@
+ $(MAKE) -C $@ -f $(SRCDIR)/../$@/Makefile SRCDIR=$(SRCDIR)/../$@ ARCH=$(ARCH)
dummy:
@exit 1
endif
-include Make.rules
+include $(SRCDIR)/Make.rules