~darkmuggle-deactivatedaccount/ubuntu/quantal/grub2/fix-872244

« back to all changes in this revision

Viewing changes to grub-core/Makefile.am

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Colin Watson, Evan Broder, Mario Limonciello
  • Date: 2010-11-24 13:59:55 UTC
  • mfrom: (1.17.6 upstream) (17.6.15 experimental)
  • Revision ID: james.westby@ubuntu.com-20101124135955-r6ii5sepayr7jt53
Tags: 1.99~20101124-1ubuntu1
[ Colin Watson ]
* Resynchronise with Debian experimental.  Remaining changes:
  - Adjust for default Ubuntu boot options ("quiet splash").
  - Default to hiding the menu; holding down Shift at boot will show it.
  - Set a monochromatic theme for Ubuntu.
  - Apply Ubuntu GRUB Legacy changes to legacy update-grub script: title,
    recovery mode, quiet option, tweak how memtest86+ is displayed, and
    use UUIDs where appropriate.
  - Fix backslash-escaping in merge_debconf_into_conf.
  - Remove "GNU/Linux" from default distributor string.
  - Add crashkernel= options if kdump and makedumpfile are available.
  - If other operating systems are installed, then automatically unhide
    the menu.  Otherwise, if GRUB_HIDDEN_TIMEOUT is 0, then use keystatus
    if available to check whether Shift is pressed.  If it is, show the
    menu, otherwise boot immediately.  If keystatus is not available, then
    fall back to a short delay interruptible with Escape.
  - Allow Shift to interrupt 'sleep --interruptible'.
  - Don't display introductory message about line editing unless we're
    actually offering a shell prompt.  Don't clear the screen just before
    booting if we never drew the menu in the first place.
  - Remove some verbose messages printed before reading the configuration
    file.
  - Suppress progress messages as the kernel and initrd load for
    non-recovery kernel menu entries.
  - Change prepare_grub_to_access_device to handle filesystems
    loop-mounted on file images.
  - Ignore devices loop-mounted from files in 10_linux.
  - Show the boot menu if the previous boot failed, that is if it failed
    to get to the end of one of the normal runlevels.
  - Don't generate /boot/grub/device.map during grub-install or
    grub-mkconfig by default.
  - Adjust upgrade version checks for Ubuntu.
  - Don't display "GRUB loading" unless Shift is held down.
  - Adjust versions of grub-doc and grub-legacy-doc conflicts to tolerate
    our backport of the grub-doc split.
  - Fix LVM/RAID probing in the absence of /boot/grub/device.map.
  - Look for .mo files in /usr/share/locale-langpack as well, in
    preference.
  - Make sure GRUB_TIMEOUT isn't quoted unnecessarily.
  - Probe all devices in 'grub-probe --target=drive' if
    /boot/grub/device.map is missing.
  - Build-depend on qemu-kvm rather than qemu-system for grub-pc tests.
  - Use qemu rather than qemu-system-i386.
  - Program vesafb on BIOS systems rather than efifb.
  - Add a grub-rescue-efi-amd64 package containing a rescue CD-ROM image
    for EFI-AMD64.
  - On Wubi, don't ask for an install device, but just update wubildr
    using the diverted grub-install.
  - When embedding the core image in a post-MBR gap, check for and avoid
    sectors matching any of a list of known signatures.
  - Disable video_bochs and video_cirrus on PC BIOS systems, as probing
    PCI space seems to break on some systems.
* Downgrade "ACPI shutdown failed" error to a debug message, since it can
  cause spurious test failures.

[ Evan Broder ]
* Enable lua from grub-extras.
* Incorporate the bitop library into lua.
* Add enum_pci function to grub module in lua.
* Switch back to gfxpayload=keep by default, unless the video hardware
  is known to not support it.

[ Mario Limonciello ]
* Built part_msdos and vfat into bootx64.efi (LP: #677758)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AUTOMAKE_OPTIONS = subdir-objects
 
2
 
 
3
DEPDIR=.deps-core
 
4
 
 
5
include $(top_srcdir)/conf/Makefile.common
 
6
 
 
7
CC=$(TARGET_CC)
 
8
CPP=$(TARGET_CC)
 
9
CCAS=$(TARGET_CC)
 
10
 
 
11
if COND_GRUB_MKFONT
 
12
if COND_HAVE_FONT_SOURCE
 
13
TARGET_CFLAGS += -DUSE_ASCII_FAILBACK=1 -DHAVE_UNIFONT_WIDTHSPEC=1
 
14
endif
 
15
endif
 
16
 
 
17
AM_CFLAGS = $(TARGET_CFLAGS)
 
18
AM_LDFLAGS = $(TARGET_LDFLAGS)
 
19
AM_CPPFLAGS = $(TARGET_CPPFLAGS) $(CPPFLAGS_DEFAULT)
 
20
AM_CCASFLAGS = $(TARGET_CCASFLAGS) $(CCASFLAGS_DEFAULT)
 
21
 
 
22
CFLAGS_PROGRAM += $(CFLAGS_PLATFORM)
 
23
LDFLAGS_PROGRAM += $(LDFLAGS_PLATFORM)
 
24
CPPFLAGS_PROGRAM += $(CPPFLAGS_PLATFORM)
 
25
CCASFLAGS_PROGRAM += $(CCASFLAGS_PLATFORM)
 
26
 
 
27
CFLAGS_LIBRARY += $(CFLAGS_PLATFORM) -fno-builtin
 
28
CPPFLAGS_LIBRARY += $(CPPFLAGS_PLATFORM)
 
29
CCASFLAGS_LIBRARY += $(CCASFLAGS_PLATFORM)
 
30
 
 
31
# gentrigtables
 
32
gentrigtables: gentrigtables.c
 
33
        $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(CPPFLAGS) $< -lm
 
34
CLEANFILES += gentrigtables
 
35
 
 
36
# trigtables.c
 
37
trigtables.c: gentrigtables gentrigtables.c $(top_srcdir)/configure.ac
 
38
        $(builddir)/gentrigtables > $@
 
39
CLEANFILES += trigtables.c
 
40
 
 
41
# XXX Use Automake's LEX & YACC support
 
42
grub_script.tab.h: script/parser.y
 
43
        $(YACC) -d -p grub_script_yy -b grub_script $<
 
44
grub_script.tab.c: grub_script.tab.h
 
45
CLEANFILES += grub_script.tab.c grub_script.tab.h
 
46
 
 
47
# For the lexer.
 
48
grub_script.yy.h: script/yylex.l
 
49
        $(LEX) -o grub_script.yy.c --header-file=grub_script.yy.h $<
 
50
grub_script.yy.c: grub_script.yy.h
 
51
 
 
52
rs_decoder.S: $(srcdir)/lib/reed_solomon.c
 
53
        $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -I$(top_builddir) -S -DSTANDALONE -o $@ $< -g0 -mregparm=3
 
54
 
 
55
kern/i386/pc/startup.S: $(builddir)/rs_decoder.S
 
56
 
 
57
CLEANFILES += grub_script.yy.c grub_script.yy.h
 
58
 
 
59
include $(srcdir)/Makefile.core.am
 
60
 
 
61
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/cache.h
 
62
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h
 
63
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/device.h
 
64
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/disk.h
 
65
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/dl.h
 
66
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env.h
 
67
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env_private.h
 
68
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/err.h
 
69
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/file.h
 
70
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/fs.h
 
71
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i18n.h
 
72
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/kernel.h
 
73
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/list.h
 
74
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/misc.h
 
75
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/mm.h
 
76
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/parser.h
 
77
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/partition.h
 
78
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/term.h
 
79
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/time.h
 
80
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/mm_private.h
 
81
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/boot.h
 
82
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/libgcc.h
 
83
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/memory.h
 
84
 
 
85
if COND_i386_pc
 
86
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/loader.h
 
87
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
 
88
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/pxe.h
 
89
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/int.h
 
90
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
 
91
endif
 
92
 
 
93
if COND_i386_efi
 
94
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
 
95
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/time.h
 
96
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
 
97
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
 
98
endif
 
99
 
 
100
if COND_i386_coreboot
 
101
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
 
102
endif
 
103
 
 
104
if COND_i386_multiboot
 
105
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
 
106
endif
 
107
 
 
108
if COND_i386_qemu
 
109
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h
 
110
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
 
111
endif
 
112
 
 
113
if COND_i386_ieee1275
 
114
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h
 
115
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
 
116
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
 
117
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
 
118
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
 
119
endif
 
120
 
 
121
if COND_x86_64_efi
 
122
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
 
123
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/time.h
 
124
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
 
125
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
 
126
endif
 
127
 
 
128
if COND_mips_yeeloong
 
129
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/keyboard_layouts.h
 
130
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
 
131
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/cpu/cache.h
 
132
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/bitmap.h
 
133
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video.h
 
134
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/gfxterm.h
 
135
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/font.h
 
136
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/bitmap_scale.h
 
137
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/bufio.h
 
138
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h
 
139
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/cs5536.h
 
140
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/pci.h
 
141
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/serial.h
 
142
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/loader.h
 
143
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
 
144
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
 
145
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
 
146
endif
 
147
 
 
148
if COND_powerpc_ieee1275
 
149
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h
 
150
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
 
151
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
 
152
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
 
153
endif
 
154
 
 
155
if COND_sparc64_ieee1275
 
156
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h
 
157
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/sparc64/ieee1275/ieee1275.h
 
158
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
 
159
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
 
160
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
 
161
endif
 
162
 
 
163
if COND_emu
 
164
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/datetime.h
 
165
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/misc.h
 
166
if COND_GRUB_EMU_SDL
 
167
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/sdl.h
 
168
endif
 
169
if COND_GRUB_EMU_USB
 
170
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/libusb.h
 
171
endif
 
172
if COND_GRUB_EMU_PCI
 
173
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/libpciaccess.h
 
174
endif
 
175
endif
 
176
 
 
177
symlist.h: $(top_builddir)/config.h $(KERNEL_HEADER_FILES)
 
178
        @list='$^'; \
 
179
        for p in $$list; do \
 
180
          echo "#include <$$p>" >> $@ || (rm -f $@; exit 1); \
 
181
        done
 
182
CLEANFILES += symlist.h
 
183
BUILT_SOURCES += symlist.h
 
184
 
 
185
symlist.c: symlist.h gensymlist.sh
 
186
        $(TARGET_CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) $(CPPFLAGS) -DGRUB_SYMBOL_GENERATOR=1 symlist.h > symlist.p || (rm -f symlist.p; exit 1)
 
187
        cat symlist.p | /bin/sh $(srcdir)/gensymlist.sh $(top_builddir)/config.h $(KERNEL_HEADER_FILES) >$@ || (rm -f $@; exit 1)
 
188
        rm -f symlist.p
 
189
CLEANFILES += symlist.c
 
190
BUILT_SOURCES += symlist.c
 
191
 
 
192
if COND_HAVE_ASM_USCORE
 
193
ASM_PREFIX=_
 
194
else
 
195
ASM_PREFIX=
 
196
endif
 
197
 
 
198
noinst_DATA += kernel_syms.lst
 
199
 
 
200
kernel_syms.lst: $(KERNEL_HEADER_FILES) $(top_builddir)/config.h
 
201
        $(TARGET_CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) $(CPPFLAGS) $(CFLAGS) -DGRUB_SYMBOL_GENERATOR=1 $^ >kernel_syms.input
 
202
        cat kernel_syms.input | grep -v '^#' | sed -n \
 
203
          -e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/defined kernel '"$(ASM_PREFIX)"'\1/;p;}' \
 
204
          -e '/EXPORT_VAR *([a-zA-Z0-9_]*)/{s/.*EXPORT_VAR *(\([a-zA-Z0-9_]*\)).*/defined kernel '"$(ASM_PREFIX)"'\1/;p;}' \
 
205
          | sort -u >$@
 
206
        rm -f kernel_syms.input
 
207
CLEANFILES += kernel_syms.lst
 
208
 
 
209
if COND_emu
 
210
kern/emu/grub_emu-main.$(OBJEXT):grub_emu_init.h
 
211
grub_emu-grub_emu_init.$(OBJEXT):grub_emu_init.h
 
212
kern/emu/grub_emu_dyn-main.$(OBJEXT):grub_emu_init.h
 
213
grub_emu_dyn-grub_emu_init.$(OBJEXT):grub_emu_init.h
 
214
 
 
215
grub_emu_init.h: genemuinitheader.sh $(MOD_FILES)
 
216
        rm -f $@; echo $(MOD_FILES) | sh $(srcdir)/genemuinitheader.sh $(NM) > $@
 
217
CLEANFILES += grub_emu_init.h
 
218
 
 
219
grub_emu_init.c: grub_emu_init.h genemuinit.sh $(MOD_FILES)
 
220
        rm -f $@; echo $(MOD_FILES) | sh $(srcdir)/genemuinit.sh $(NM) > $@
 
221
CLEANFILES += grub_emu_init.c
 
222
endif
 
223
 
 
224
# List files
 
225
 
 
226
fs.lst: $(MARKER_FILES)
 
227
        (for pp in $^; do \
 
228
          b=`basename $$pp .marker`; \
 
229
          if grep 'FS_LIST_MARKER' $$pp >/dev/null 2>&1; then \
 
230
            echo $$b; \
 
231
          fi; \
 
232
        done) | sort -u > $@
 
233
platform_DATA += fs.lst
 
234
CLEANFILES += fs.lst
 
235
 
 
236
command.lst: $(MARKER_FILES)
 
237
        (for pp in $^; do \
 
238
          b=`basename $$pp .marker`; \
 
239
          sed -n \
 
240
            -e "/EXTCOMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $$b/;p;}" \
 
241
            -e "/P1COMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $$b/;p;}" \
 
242
            -e "/COMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $$b/;p;}" $$pp; \
 
243
        done) | sort -u > $@
 
244
platform_DATA += command.lst
 
245
CLEANFILES += command.lst
 
246
 
 
247
partmap.lst: $(MARKER_FILES)
 
248
        (for pp in $^; do \
 
249
          b=`basename $$pp .marker`; \
 
250
          if grep 'PARTMAP_LIST_MARKER' $$pp >/dev/null 2>&1; then \
 
251
            echo $$b; \
 
252
          fi; \
 
253
        done) | sort -u > $@
 
254
platform_DATA += partmap.lst
 
255
CLEANFILES += partmap.lst
 
256
 
 
257
terminal.lst: $(MARKER_FILES)
 
258
        (for pp in $^; do \
 
259
          b=`basename $$pp .marker`; \
 
260
          sed -n \
 
261
            -e "/INPUT_TERMINAL_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/i\1: $$b/;p;}" \
 
262
            -e "/OUTPUT_TERMINAL_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/o\1: $$b/;p;}" $$pp; \
 
263
        done) | sort -u > $@
 
264
platform_DATA += terminal.lst
 
265
CLEANFILES += terminal.lst
 
266
 
 
267
parttool.lst: $(MARKER_FILES)
 
268
        (for pp in $^; do \
 
269
          b=`basename $$pp .marker`; \
 
270
          sed -n \
 
271
            -e "/PARTTOOL_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $$b/;p;}" $$pp; \
 
272
        done) | sort -u > $@
 
273
platform_DATA += parttool.lst
 
274
CLEANFILES += parttool.lst
 
275
 
 
276
video.lst: $(MARKER_FILES)
 
277
        (for pp in $^; do \
 
278
          b=`basename $$pp .marker`; \
 
279
          if grep 'VIDEO_LIST_MARKER' $$pp >/dev/null 2>&1; then \
 
280
            echo $$b; \
 
281
          fi; \
 
282
        done) | sort -u > $@
 
283
platform_DATA += video.lst
 
284
CLEANFILES += video.lst
 
285
 
 
286
# but, crypto.lst is simply copied
 
287
crypto.lst: $(srcdir)/lib/libgcrypt-grub/cipher/crypto.lst
 
288
        cp $^ $@
 
289
platform_DATA += crypto.lst
 
290
CLEANFILES += crypto.lst
 
291
 
 
292
syminfo.lst: gensyminfo.sh kernel_syms.lst $(MODULE_FILES)
 
293
        cat kernel_syms.lst > $@.new
 
294
        for m in $(MODULE_FILES); do \
 
295
          sh $< $$m >> $@.new || exit 1; \
 
296
        done
 
297
        mv $@.new $@
 
298
 
 
299
# generate global module dependencies list
 
300
moddep.lst: syminfo.lst genmoddep.awk
 
301
        cat $< | sort | awk -f $(srcdir)/genmoddep.awk > $@ || (rm -f $@; exit 1)
 
302
platform_DATA += moddep.lst
 
303
CLEANFILES += config.log syminfo.lst moddep.lst
 
304
 
 
305
$(MOD_FILES): %.mod : genmod.sh moddep.lst %.module$(EXEEXT)
 
306
        sh $^ $@
 
307
platform_DATA += $(MOD_FILES)
 
308
CLEANFILES += $(MOD_FILES)
 
309
 
 
310
if COND_ENABLE_EFIEMU
 
311
efiemu32.o: efiemu/runtime/efiemu.c $(TARGET_OBJ2ELF)
 
312
        -rm -f $@; \
 
313
        if test "x$(TARGET_APPLE_CC)" = x1; then \
 
314
          $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF32 -DAPPLE_CC -m32 -Wall -Werror -nostdlib -O2 -c -o $@.bin $< || exit 1; \
 
315
          $(OBJCONV) -felf32 -nu -nd $@.bin $@ || exit 1; \
 
316
          rm -f $@.bin; \
 
317
        else \
 
318
          $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF32 -m32 -Wall -Werror -nostdlib -O2 -c -o $@ $< || exit 1; \
 
319
          if test ! -z "$(TARGET_OBJ2ELF)"; then $(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi; \
 
320
        fi
 
321
 
 
322
efiemu64_c.o: efiemu/runtime/efiemu.c
 
323
        if test "x$(TARGET_APPLE_CC)" = x1; then \
 
324
          $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF64 -DAPPLE_CC=1 -m64 -nostdlib -Wall -Werror -mno-red-zone -c -o $@ $< || exit 1; \
 
325
        else \
 
326
          $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF64 -m64 -nostdlib -Wall -Werror -O2 -mcmodel=large -mno-red-zone -c -o $@ $< || exit 1; \
 
327
        fi
 
328
 
 
329
efiemu64_s.o: efiemu/runtime/efiemu.S
 
330
        -rm -f $@
 
331
        if test "x$(TARGET_APPLE_CC)" = x1; then \
 
332
          $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF64 -DAPPLE_CC=1 -m64 -Wall -Werror -nostdlib -O2 -mno-red-zone -c -o $@ $< || exit 1; \
 
333
        else \
 
334
          $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -DELF64 -m64 -Wall -Werror -nostdlib -O2 -mcmodel=large -mno-red-zone -c -o $@ $< || exit 1; \
 
335
        fi
 
336
 
 
337
efiemu64.o: efiemu64_c.o efiemu64_s.o $(TARGET_OBJ2ELEF)
 
338
        -rm -f $@; \
 
339
        if test "x$(TARGET_APPLE_CC)" = x1; then \
 
340
          rm -f $@.bin; \
 
341
          $(TARGET_CC) -m64 -Wl,-r -nostdlib -o $@.bin $^ || exit 1; \
 
342
          $(OBJCONV) -felf64 -nu -nd $@.bin $@ || exit 1; \
 
343
          rm -f $@.bin; \
 
344
        else \
 
345
          $(TARGET_CC) -m64 -nostdlib -Wl,-r -o $@ $^ || exit 1; \
 
346
          if test ! -z "$(TARGET_OBJ2ELF)"; then $(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi; \
 
347
        fi
 
348
 
 
349
platform_DATA += efiemu32.o efiemu64.o
 
350
CLEANFILES += efiemu32.o efiemu64.o efiemu64_c.o efiemu64_s.o
 
351
endif