~ubuntu-branches/ubuntu/trusty/grub2/trusty

« back to all changes in this revision

Viewing changes to conf/Makefile.common

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2014-01-16 15:18:04 UTC
  • mfrom: (17.6.38 experimental)
  • Revision ID: package-import@ubuntu.com-20140116151804-3foouk7fpqcq3sxx
Tags: 2.02~beta2-2
* Convert patch handling to git-dpm.
* Add bi-endian support to ELF parser (Tomohiro B Berry).
* Adjust restore_mkdevicemap.patch to mark get_kfreebsd_version as static,
  to appease "gcc -Werror=missing-prototypes".
* Cherry-pick from upstream:
  - Change grub-macbless' manual page section to 8.
* Install grub-glue-efi, grub-macbless, grub-render-label, and
  grub-syslinux2cfg.
* grub-shell: Pass -no-pad to xorriso when building floppy images.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
CFLAGS_PLATFORM=
4
4
 
5
5
export LC_COLLATE := C
6
 
export LC_CTYPE := C
7
6
unexport LC_ALL
8
7
 
9
8
# Platform specific options
10
 
if COND_i386_pc
11
 
  CFLAGS_PLATFORM += -mrtd -mregparm=3
12
 
endif
13
 
if COND_i386_efi
14
 
  LDFLAGS_PLATFORM = -Wl,-melf_i386
15
 
endif
16
 
if COND_x86_64_efi
17
 
  LDFLAGS_PLATFORM = -Wl,-melf_x86_64
18
 
endif
19
 
if COND_i386_qemu
20
 
  CFLAGS_PLATFORM += -mrtd -mregparm=3
21
 
endif
22
 
if COND_i386_coreboot
23
 
  CFLAGS_PLATFORM += -mrtd -mregparm=3
24
 
endif
25
 
if COND_i386_ieee1275
26
 
  CFLAGS_PLATFORM += -mrtd -mregparm=3
27
 
endif
28
 
if COND_mips_loongson
29
 
  CFLAGS_PLATFORM += -mexplicit-relocs
30
 
  CPPFLAGS_PLATFORM = -DUSE_ASCII_FAILBACK
31
 
endif
32
 
if COND_mips
33
 
  CFLAGS_PLATFORM += -mflush-func=grub_cpu_flush_cache
34
 
  CCASFLAGS_PLATFORM = -march=mips3
35
 
endif
36
9
if COND_sparc64_ieee1275
37
10
  CFLAGS_PLATFORM += -mno-app-regs
38
 
  LDFLAGS_PLATFORM = -Wl,-melf64_sparc -mno-relax
39
 
endif
 
11
  LDFLAGS_PLATFORM = -Wl,-melf64_sparc -Wl,--no-relax
 
12
endif
 
13
if COND_sparc64_emu
 
14
  CFLAGS_PLATFORM += -mno-app-regs
 
15
  LDFLAGS_PLATFORM = -Wl,--no-relax
 
16
endif
 
17
if COND_arm
 
18
if !COND_emu
 
19
  LDFLAGS_PLATFORM = -Wl,--wrap=__clear_cache
 
20
endif
 
21
endif
 
22
if COND_arm64
 
23
  CFLAGS_PLATFORM += -mcmodel=large
 
24
endif
 
25
 
 
26
#FIXME: discover and check XEN headers
 
27
CPPFLAGS_XEN = -I/usr/include
40
28
 
41
29
# Other options
42
30
 
47
35
CPPFLAGS_DEFAULT += -I$(top_srcdir)
48
36
CPPFLAGS_DEFAULT += -I$(top_srcdir)/include
49
37
CPPFLAGS_DEFAULT += -I$(top_builddir)/include
50
 
CCASFLAGS_DEFAULT = -DASM_FILE=1
51
 
 
52
 
LDADD_KERNEL =
53
 
 
54
 
if ! COND_i386_pc
55
 
if ! COND_i386_efi
56
 
if ! COND_i386_qemu
57
 
if ! COND_i386_coreboot
58
 
if ! COND_i386_multiboot
59
 
if ! COND_i386_ieee1275
60
 
if ! COND_x86_64_efi
61
 
LDADD_KERNEL += -lgcc
62
 
endif
63
 
endif
64
 
endif
65
 
endif
66
 
endif
67
 
endif
68
 
endif
 
38
CPPFLAGS_DEFAULT += -I$(top_srcdir)/grub-core/lib/libgcrypt-grub/src/
 
39
CCASFLAGS_DEFAULT = $(CPPFLAGS_DEFAULT) -DASM_FILE=1
 
40
BUILD_CPPFLAGS += $(CPPFLAGS_DEFAULT)
 
41
 
 
42
LDADD_KERNEL = $(TARGET_LIBGCC)
69
43
 
70
44
CFLAGS_KERNEL = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding
71
 
LDFLAGS_KERNEL = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib $(TARGET_LDFLAGS_OLDMAGIC) -static-libgcc
72
 
CPPFLAGS_KERNEL = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM)
 
45
LDFLAGS_KERNEL = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib $(TARGET_LDFLAGS_OLDMAGIC) $(TARGET_LDFLAGS_STATIC_LIBGCC)
 
46
CPPFLAGS_KERNEL = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM) -DGRUB_KERNEL=1
73
47
CCASFLAGS_KERNEL = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
74
 
if COND_CYGWIN
75
 
STRIPFLAGS_KERNEL = -F elf32-i386 -R .rel.dyn -R .reginfo -R .note -R .comment -R .drectve -R .note.gnu.gold-version
76
 
else
77
 
STRIPFLAGS_KERNEL = -R .rel.dyn -R .reginfo -R .note -R .comment -R .note.gnu.gold-version
78
 
endif
 
48
STRIPFLAGS_KERNEL = -R .rel.dyn -R .reginfo -R .note -R .comment -R .drectve -R .note.gnu.gold-version
79
49
 
80
50
CFLAGS_MODULE = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding
81
51
LDFLAGS_MODULE = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib $(TARGET_LDFLAGS_OLDMAGIC) -Wl,-r,-d
102
72
platformdir = $(pkglibdir)/$(target_cpu)-$(platform)
103
73
starfielddir = $(pkgdatadir)/themes/starfield
104
74
 
105
 
CFLAGS_GCRY = -Wno-error -Wno-missing-field-initializers
106
 
CPPFLAGS_GCRY = -I$(top_srcdir)/grub-core/lib/libgcrypt_wrap
107
 
 
108
 
CFLAGS_GNULIB = -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-conversion -Wno-old-style-definition -Wno-unsafe-loop-optimizations
 
75
CFLAGS_GNULIB = -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code -Wno-conversion
109
76
CPPFLAGS_GNULIB = -I$(top_builddir)/grub-core/gnulib -I$(top_srcdir)/grub-core/gnulib
110
77
 
111
78
CFLAGS_POSIX = -fno-builtin
112
79
CPPFLAGS_POSIX = -I$(top_srcdir)/grub-core/lib/posix_wrap
113
80
 
 
81
CFLAGS_GCRY = -Wno-error -Wno-missing-field-initializers -Wno-redundant-decls -Wno-undef $(CFLAGS_POSIX)
 
82
CPPFLAGS_GCRY = -I$(top_srcdir)/grub-core/lib/libgcrypt_wrap $(CPPFLAGS_POSIX) -D_GCRYPT_IN_LIBGCRYPT=1 -I$(top_srcdir)/include/grub/gcrypt
 
83
 
114
84
CPPFLAGS_EFIEMU = -I$(top_srcdir)/grub-core/efiemu/runtime
115
85
 
116
86
# List file macros for recognizing /interesting/ modules
144
114
platform_DATA =
145
115
sbin_PROGRAMS =
146
116
check_SCRIPTS =
147
 
grubconf_DATA =
 
117
dist_grubconf_DATA =
148
118
check_PROGRAMS =
149
119
noinst_SCRIPTS =
150
120
noinst_PROGRAMS =
159
129
CLEANFILES =
160
130
BUILT_SOURCES =
161
131
 
162
 
# Rules for autogen definition files
163
 
 
164
 
.PRECIOUS: $(top_srcdir)/Makefile.tpl
165
 
$(top_srcdir)/Makefile.tpl: $(top_srcdir)/gentpl.py
166
 
        python $< | sed -e '/^$$/{N;/^\\n$$/D;}' > $@.new || (rm -f $@.new; exit 1)
167
 
        mv $@.new $@
 
132
# Rules for Automake input
168
133
 
169
134
.PRECIOUS: $(top_srcdir)/Makefile.util.am
170
 
$(top_srcdir)/Makefile.util.am: $(top_srcdir)/Makefile.util.def $(top_srcdir)/Makefile.tpl
171
 
        autogen -T $(top_srcdir)/Makefile.tpl $< | sed -e '/^$$/{N;/^\\n$$/D;}' > $@.new || (rm -f $@.new; exit 1)
 
135
$(top_srcdir)/Makefile.util.am: $(top_srcdir)/gentpl.py $(top_srcdir)/Makefile.util.def $(top_srcdir)/Makefile.utilgcry.def
 
136
        python $^ > $@.new || (rm -f $@.new; exit 1)
172
137
        mv $@.new $@
173
138
 
174
139
.PRECIOUS: $(top_srcdir)/grub-core/Makefile.core.am
175
 
$(top_srcdir)/grub-core/Makefile.core.am: $(top_srcdir)/grub-core/Makefile.core.def $(top_srcdir)/grub-core/Makefile.gcry.def $(top_srcdir)/Makefile.tpl
 
140
$(top_srcdir)/grub-core/Makefile.core.am: $(top_srcdir)/gentpl.py $(top_srcdir)/grub-core/Makefile.core.def $(top_srcdir)/grub-core/Makefile.gcry.def
176
141
        if [ "x$$GRUB_CONTRIB" != x ]; then echo "You need to run ./autogen.sh manually." >&2; exit 1; fi
177
 
        autogen -T $(top_srcdir)/Makefile.tpl $(top_srcdir)/grub-core/Makefile.core.def $(top_srcdir)/grub-core/Makefile.gcry.def | sed -e '/^$$/{N;/^\\n$$/D;}' > $@.new || (rm -f $@.new; exit 1)
 
142
        python $^ > $@.new || (rm -f $@.new; exit 1)
178
143
        mv $@.new $@