0
|
1 #
|
|
2 # Copyright (C) 2001-2003 Hewlett-Packard Co.
|
|
3 # Contributed by Stephane Eranian <eranian@hpl.hp.com>
|
|
4 # Contributed by Fenghua Yu<fenghua.yu@intel.com>
|
|
5 # Contributed by Chandramouli Narayanan<mouli@linux.intel.com>
|
|
6 #
|
|
7 # This file is part of ELILO, the LINUX EFI boot loader.
|
|
8 #
|
|
9 # ELILO is free software; you can redistribute it and/or modify
|
|
10 # it under the terms of the GNU General Public License as published by
|
|
11 # the Free Software Foundation; either version 2, or (at your option)
|
|
12 # any later version.
|
|
13 #
|
|
14 # ELILO is distributed in the hope that it will be useful,
|
|
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17 # GNU General Public License for more details.
|
|
18 #
|
|
19 # You should have received a copy of the GNU General Public License
|
|
20 # along with ELILO; see the file COPYING. If not, write to the Free
|
|
21 # Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|
22 # 02111-1307, USA.
|
|
23 #
|
|
24 # Please check out the elilo.txt for complete documentation on how
|
|
25 # to use this program.
|
|
26 #
|
|
27
|
|
28 include Make.defaults
|
|
29 TOPDIR=.
|
|
30
|
|
31 EFICRT0 = /usr/lib64/gnuefi
|
|
32
|
|
33 CRTOBJS = $(EFICRT0)/crt0-efi-$(ARCH).o
|
|
34 LDSCRIPT = $(EFICRT0)/elf_$(ARCH)_efi.lds
|
|
35
|
|
36 LDFLAGS += -T $(LDSCRIPT) -shared -Bsymbolic -L$(EFILIB) -L$(GNUEFILIB) $(CRTOBJS)
|
|
37 LOADLIBES = -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name)
|
|
38 FORMAT = efi-app-$(ARCH)
|
|
39
|
|
40 FILESYSTEM =
|
|
41
|
|
42 ifeq ($(CONFIG_localfs),y)
|
|
43 FILESYSTEMS += glue_localfs.o
|
|
44 endif
|
|
45
|
|
46 ifeq ($(CONFIG_ext2fs),y)
|
|
47 FILESYSTEMS += glue_ext2fs.o
|
|
48 endif
|
|
49
|
|
50 ifeq ($(CONFIG_netfs),y)
|
|
51 FILESYSTEMS += glue_netfs.o
|
|
52 endif
|
|
53
|
|
54 SUBDIRS = fs choosers devschemes tools
|
|
55
|
|
56 ifeq ($(ARCH),ia64)
|
|
57 SUBDIRS += ia64
|
|
58 endif
|
|
59
|
|
60 ifeq ($(ARCH),ia32)
|
|
61 SUBDIRS += ia32
|
|
62 endif
|
|
63
|
|
64 ifeq ($(ARCH),x86_64)
|
|
65 SUBDIRS += x86_64
|
|
66 endif
|
|
67
|
|
68 FILES = elilo.o getopt.o strops.o loader.o \
|
|
69 fileops.o util.o vars.o alloc.o chooser.o \
|
|
70 config.o initrd.o alternate.o bootparams.o \
|
|
71 gunzip.o console.o fs/fs.o \
|
|
72 choosers/choosers.o \
|
|
73 devschemes/devschemes.o \
|
|
74 $(ARCH)/sysdeps.o \
|
1
|
75 $(ARCH)/elilo_kernel.o \
|
0
|
76 $(FILESYSTEMS)
|
|
77
|
|
78 TARGETS = elilo.efi
|
|
79
|
|
80 all: check_gcc $(SUBDIRS) $(TARGETS)
|
|
81
|
|
82 elilo.efi: elilo.so
|
|
83
|
|
84 elilo.so: $(FILES)
|
|
85
|
|
86 elilo.o : elilo.c $(ARCH)/sysdeps.h
|
|
87
|
|
88 fileops.o : Make.defaults
|
|
89 chooser.o : Make.defaults
|
|
90
|
|
91 $(SUBDIRS): dummy
|
|
92 $(MAKE) -C $@
|
|
93
|
|
94 dummy:
|
|
95
|
|
96 clean:
|
|
97 @set -e ; for d in $(SUBDIRS) ; do $(MAKE) -C $$d $@ ; done
|
|
98 rm -f $(TARGETS) *~ *.so $(FILES)
|
|
99
|
|
100 .PRECIOUS: elilo.so
|
|
101
|
|
102 #
|
|
103 # on both platforms you must use gcc 3.0 or higher
|
|
104 #
|
|
105 check_gcc:
|
|
106 ifeq ($(GCC_VERSION),2)
|
|
107 @echo "you need to use a version of gcc >= 3.0, you are using `$(CC) --version`"
|
|
108 @exit 1
|
|
109 endif
|
|
110
|
|
111 include Make.rules
|