Rev 2726 | Rev 3022 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2726 | Rev 2738 | ||
---|---|---|---|
1 | # |
1 | # |
2 | # Copyright (c) 1999-2004 Hewlett-Packard Development Company, L.P. |
2 | # Copyright (c) 1999-2004 Hewlett-Packard Development Company, L.P. |
3 | # Contributed by David Mosberger <davidm@hpl.hp.com> |
3 | # Contributed by David Mosberger <davidm@hpl.hp.com> |
4 | # Contributed by Stephane Eranian <eranian@hpl.hp.com> |
4 | # Contributed by Stephane Eranian <eranian@hpl.hp.com> |
5 | # |
5 | # |
6 | # This file is part of the gnu-efi package. |
6 | # This file is part of the gnu-efi package. |
7 | # |
7 | # |
8 | # GNU-EFI is free software; you can redistribute it and/or modify |
8 | # GNU-EFI is free software; you can redistribute it and/or modify |
9 | # it under the terms of the GNU General Public License as published by |
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) |
10 | # the Free Software Foundation; either version 2, or (at your option) |
11 | # any later version. |
11 | # any later version. |
12 | # |
12 | # |
13 | # GNU-EFI is distributed in the hope that it will be useful, |
13 | # GNU-EFI is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. |
16 | # GNU General Public License for more details. |
17 | # |
17 | # |
18 | # You should have received a copy of the GNU General Public License |
18 | # You should have received a copy of the GNU General Public License |
19 | # along with GNU-EFI; see the file COPYING. If not, write to the Free |
19 | # along with GNU-EFI; see the file COPYING. If not, write to the Free |
20 | # Software Foundation, 59 Temple Place - Suite 330, Boston, MA |
20 | # Software Foundation, 59 Temple Place - Suite 330, Boston, MA |
21 | # 02111-1307, USA. |
21 | # 02111-1307, USA. |
22 | # |
22 | # |
23 | 23 | ||
24 | # |
24 | # |
25 | # Where to install the package. GNU-EFI will create and access |
25 | # Where to install the package. GNU-EFI will create and access |
26 | # lib and include under the root |
26 | # lib and include under the root |
27 | # |
27 | # |
28 | INSTALLROOT=/usr/local |
28 | INSTALLROOT=/usr/local |
29 | 29 | ||
30 | TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) |
30 | TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) |
31 | 31 | ||
32 | ARCH = $(shell uname -m | sed s,i[3456789]86,ia32,) |
32 | ARCH = $(shell uname -m | sed s,i[3456789]86,ia32,) |
33 | INCDIR = -I. -I$(CDIR)/inc -I$(CDIR)/inc/$(ARCH) -I$(CDIR)/inc/protocol |
33 | INCDIR = -I. -I$(CDIR)/inc -I$(CDIR)/inc/$(ARCH) -I$(CDIR)/inc/protocol |
34 | CPPFLAGS = -DCONFIG_$(ARCH) |
34 | CPPFLAGS = -DCONFIG_$(ARCH) |
35 | CFLAGS = -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants |
35 | CFLAGS = -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants |
36 | LDFLAGS = -nostdlib |
36 | LDFLAGS = -nostdlib |
37 | INSTALL = install |
37 | INSTALL = install |
38 | 38 | ||
39 | GCC_VERSION=$(shell $(CROSS_COMPILE)$(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.') |
39 | GCC_VERSION=$(shell $(CROSS_COMPILE)$(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.') |
40 | 40 | ||
41 | ifeq ($(ARCH),ia64) |
- | |
42 | prefix = |
41 | # prefix = |
43 | CC = $(prefix)gcc |
42 | CC = $(prefix)gcc |
44 | AS = $(prefix)as |
43 | AS = $(prefix)as |
45 | LD = $(prefix)ld |
44 | LD = $(prefix)ld |
46 | AR = $(prefix)ar |
45 | AR = $(prefix)ar |
47 | RANLIB = $(prefix)ranlib |
46 | RANLIB = $(prefix)ranlib |
48 | OBJCOPY = $(prefix)objcopy |
47 | OBJCOPY = $(prefix)objcopy |
- | 48 | OBJDUMP = $(prefix)objdump |
|
49 | 49 | ||
50 | 50 | ||
51 | ifneq ($(GCC_VERSION),2) |
51 | ifneq ($(GCC_VERSION),2) |
52 | CFLAGS += -frename-registers |
52 | CFLAGS += -frename-registers |
53 | endif |
53 | endif |
54 | 54 | ||
55 | CFLAGS += -mfixed-range=f32-f127 |
55 | CFLAGS += -mfixed-range=f32-f127 |
56 | 56 | ||
57 | else |
- | |
58 | ifeq ($(ARCH),ia32) |
- | |
59 | # |
- | |
60 | # gcc-3.x is required |
- | |
61 | # |
- | |
62 | prefix = |
- | |
63 | ifneq ($(GCC_VERSION),2) |
- | |
64 | CC = $(prefix)gcc |
- | |
65 | else |
- | |
66 | CC = $(prefix)gcc3 #must have gcc 3.x |
- | |
67 | endif |
- | |
68 | AS = $(prefix)as |
- | |
69 | LD = $(prefix)ld |
- | |
70 | AR = $(prefix)ar |
- | |
71 | RANLIB = $(prefix)ranlib |
- | |
72 | OBJCOPY = $(prefix)objcopy |
- | |
73 | endif |
- | |
74 | endif |
- | |
75 | - | ||
76 | 57 |