annotate Makefile @ 1:1b2326947b0d

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