source: grub-pc/trunk/fuentes/grub-core/Makefile.am @ 22

Last change on this file since 22 was 22, checked in by mabarracus, 4 years ago

updated version and apply net.ifnames=0 into debian/rules

File size: 16.1 KB
Line 
1AUTOMAKE_OPTIONS = subdir-objects -Wno-portability
2
3DEPDIR=.deps-core
4
5include $(top_srcdir)/conf/Makefile.common
6
7CC=$(TARGET_CC)
8CPP=$(TARGET_CC)
9CCAS=$(TARGET_CC)
10RANLIB=$(TARGET_RANLIB)
11STRIP=$(TARGET_STRIP)
12
13MACHO2IMG=$(top_builddir)/grub-macho2img
14
15AM_CFLAGS = $(TARGET_CFLAGS)
16AM_LDFLAGS = $(TARGET_LDFLAGS)
17AM_CPPFLAGS = $(TARGET_CPPFLAGS) $(CPPFLAGS_DEFAULT)
18AM_CCASFLAGS = $(TARGET_CCASFLAGS) $(CCASFLAGS_DEFAULT)
19
20CFLAGS_PROGRAM += $(CFLAGS_PLATFORM)
21LDFLAGS_PROGRAM += $(LDFLAGS_PLATFORM)
22CPPFLAGS_PROGRAM += $(CPPFLAGS_PLATFORM)
23CCASFLAGS_PROGRAM += $(CCASFLAGS_PLATFORM)
24
25CFLAGS_LIBRARY += $(CFLAGS_PLATFORM) -fno-builtin
26CPPFLAGS_LIBRARY += $(CPPFLAGS_PLATFORM)
27CCASFLAGS_LIBRARY += $(CCASFLAGS_PLATFORM)
28
29build-grub-pep2elf: $(top_srcdir)/util/grub-pe2elf.c $(top_srcdir)/grub-core/kern/emu/misc.c $(top_srcdir)/util/misc.c
30        $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) -DGRUB_BUILD=1 -DGRUB_TARGET_WORDSIZE=64 -DGRUB_UTIL=1 -DGRUB_BUILD_PROGRAM_NAME=\"build-grub-pep2elf\" $^
31
32build-grub-pe2elf: $(top_srcdir)/util/grub-pe2elf.c $(top_srcdir)/grub-core/kern/emu/misc.c $(top_srcdir)/util/misc.c
33        $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) -DGRUB_BUILD=1 -DGRUB_TARGET_WORDSIZE=32 -DGRUB_UTIL=1 -DGRUB_BUILD_PROGRAM_NAME=\"build-grub-pe2elf\" $^
34
35# gentrigtables
36gentrigtables: gentrigtables.c
37        $(BUILD_CC) -o $@ -I$(top_srcdir)/include $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< $(BUILD_LIBM)
38CLEANFILES += gentrigtables
39
40# trigtables.c
41trigtables.c: gentrigtables gentrigtables.c $(top_srcdir)/configure.ac
42        ./gentrigtables > $@
43CLEANFILES += trigtables.c
44
45# XXX Use Automake's LEX & YACC support
46grub_script.tab.h: script/parser.y
47        $(YACC) -d -p grub_script_yy -b grub_script $<
48grub_script.tab.c: grub_script.tab.h
49CLEANFILES += grub_script.tab.c grub_script.tab.h
50
51# For the lexer.
52grub_script.yy.h: script/yylex.l
53        $(LEX) -o grub_script.yy.c --header-file=grub_script.yy.h $<
54grub_script.yy.c: grub_script.yy.h
55
56rs_decoder.h: $(srcdir)/lib/reed_solomon.c
57        $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Os -I$(top_builddir) -S -DSTANDALONE -o $@ $< -g0 -mregparm=3 -ffreestanding
58
59CLEANFILES += grub_script.yy.c grub_script.yy.h
60
61include $(srcdir)/Makefile.core.am
62
63KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/cache.h
64KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h
65KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/device.h
66KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/disk.h
67KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/dl.h
68KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env.h
69KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env_private.h
70KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/err.h
71KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/file.h
72KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/fs.h
73KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i18n.h
74KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/kernel.h
75KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/list.h
76KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/misc.h
77KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/compiler-rt.h
78KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/mm.h
79KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/parser.h
80KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/partition.h
81KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/term.h
82KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/time.h
83KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/mm_private.h
84KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/net.h
85if !COND_clang
86KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/libgcc.h
87endif
88KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/memory.h
89
90if COND_i386_pc
91KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
92KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/pxe.h
93KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/int.h
94KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
95endif
96
97if COND_i386_efi
98KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
99KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
100KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
101KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h
102endif
103
104if COND_i386_coreboot
105KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
106KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/coreboot/lbio.h
107KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video.h
108KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video_fb.h
109KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/gfxterm.h
110KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/font.h
111KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/bufio.h
112endif
113
114if COND_i386_multiboot
115KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
116endif
117
118if COND_i386_qemu
119KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h
120KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
121endif
122
123if COND_i386_ieee1275
124KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h
125KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
126KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
127KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
128KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
129endif
130
131if COND_i386_xen
132KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/xen.h
133KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/xen/hypercall.h
134KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
135KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
136KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
137KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/loader.h
138endif
139
140if COND_x86_64_xen
141KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/xen.h
142KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/x86_64/xen/hypercall.h
143KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
144KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
145KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
146KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/loader.h
147endif
148
149if COND_x86_64_efi
150KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
151KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
152KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
153KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h
154endif
155
156if COND_ia64_efi
157KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
158KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
159endif
160
161if COND_mips
162KERNEL_HEADER_FILES += $(top_builddir)/include/grub/cpu/kernel.h
163endif
164
165if COND_mips_arc
166KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
167KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arc/arc.h
168KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
169endif
170
171if COND_mips_qemu_mips
172KERNEL_HEADER_FILES += $(top_builddir)/include/grub/keyboard_layouts.h
173KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
174KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/serial.h
175KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/loader.h
176KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
177KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
178KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
179endif
180
181if COND_mips_loongson
182KERNEL_HEADER_FILES += $(top_builddir)/include/grub/keyboard_layouts.h
183KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
184KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/time.h
185KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video.h
186KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video_fb.h
187KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/gfxterm.h
188KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/font.h
189KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/bufio.h
190KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h
191KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/cs5536.h
192KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/pci.h
193KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/serial.h
194KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/loader.h
195KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
196KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
197KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
198endif
199
200if COND_mips_qemu_mips
201KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/memory.h
202KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
203endif
204
205if COND_powerpc_ieee1275
206KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h
207KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
208KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
209KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
210endif
211
212if COND_sparc64_ieee1275
213KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h
214KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/sparc64/ieee1275/ieee1275.h
215KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
216KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
217KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
218endif
219
220if COND_arm_uboot
221KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/uboot/uboot.h
222KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/uboot/disk.h
223KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
224KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
225KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/system.h
226endif
227
228if COND_arm_efi
229KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/efi/loader.h
230KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
231KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
232KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/system.h
233endif
234
235if COND_arm64_efi
236KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
237KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h
238endif
239
240if COND_emu
241KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/datetime.h
242KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/misc.h
243KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/net.h
244KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/hostdisk.h
245KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/hostfile.h
246KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
247if COND_GRUB_EMU_SDL
248KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/sdl.h
249endif
250if COND_GRUB_EMU_USB
251KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/libusb.h
252endif
253if COND_GRUB_EMU_PCI
254KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/libpciaccess.h
255endif
256endif
257
258symlist.h: $(top_builddir)/config.h $(KERNEL_HEADER_FILES)
259        @list='$^'; \
260        for p in $$list; do \
261          echo "#include <$$p>" >> $@ || (rm -f $@; exit 1); \
262        done
263CLEANFILES += symlist.h
264BUILT_SOURCES += symlist.h
265
266symlist.c: symlist.h gensymlist.sh
267        $(TARGET_CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) $(CPPFLAGS) -DGRUB_SYMBOL_GENERATOR=1 symlist.h > symlist.p || (rm -f symlist.p; exit 1)
268        cat symlist.p | /bin/sh $(srcdir)/gensymlist.sh $(top_builddir)/config.h $(KERNEL_HEADER_FILES) >$@ || (rm -f $@; exit 1)
269        rm -f symlist.p
270CLEANFILES += symlist.c
271BUILT_SOURCES += symlist.c
272
273if COND_HAVE_ASM_USCORE
274ASM_PREFIX=_
275else
276ASM_PREFIX=
277endif
278
279noinst_DATA += kernel_syms.lst
280
281kernel_syms.lst: $(KERNEL_HEADER_FILES) $(top_builddir)/config.h
282        $(TARGET_CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) $(CPPFLAGS) $(CFLAGS) -DGRUB_SYMBOL_GENERATOR=1 $^ >kernel_syms.input
283        cat kernel_syms.input | grep -v '^#' | sed -n \
284          -e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/defined kernel '"$(ASM_PREFIX)"'\1/;p;}' \
285          -e '/EXPORT_VAR *([a-zA-Z0-9_]*)/{s/.*EXPORT_VAR *(\([a-zA-Z0-9_]*\)).*/defined kernel '"$(ASM_PREFIX)"'\1/;p;}' \
286          | sort -u >$@
287        rm -f kernel_syms.input
288CLEANFILES += kernel_syms.lst
289
290if COND_emu
291kern/emu/grub_emu-main.$(OBJEXT):grub_emu_init.h
292grub_emu-grub_emu_init.$(OBJEXT):grub_emu_init.h
293kern/emu/grub_emu_dyn-main.$(OBJEXT):grub_emu_init.h
294grub_emu_dyn-grub_emu_init.$(OBJEXT):grub_emu_init.h
295
296grub_emu_init.h: genemuinitheader.sh $(MOD_FILES)
297        rm -f $@; echo $(MOD_FILES) | sh $(srcdir)/genemuinitheader.sh $(TARGET_NM) > $@
298CLEANFILES += grub_emu_init.h
299
300grub_emu_init.c: grub_emu_init.h genemuinit.sh $(MOD_FILES)
301        rm -f $@; echo $(MOD_FILES) | sh $(srcdir)/genemuinit.sh $(TARGET_NM) > $@
302CLEANFILES += grub_emu_init.c
303endif
304
305# List files
306
307fs.lst: $(MARKER_FILES)
308        (for pp in $^; do \
309          b=`basename $$pp .marker`; \
310          if grep 'FS_LIST_MARKER' $$pp >/dev/null 2>&1; then \
311            echo $$b; \
312          fi; \
313        done) | sort -u > $@
314platform_DATA += fs.lst
315CLEANFILES += fs.lst
316
317command.lst: $(MARKER_FILES)
318        (for pp in $^; do \
319          b=`basename $$pp .marker`; \
320          sed -n \
321            -e "/EXTCOMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $$b/;p;}" \
322            -e "/P1COMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $$b/;p;}" \
323            -e "/COMMAND_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $$b/;p;}" $$pp; \
324        done) | sort -u > $@
325platform_DATA += command.lst
326CLEANFILES += command.lst
327
328partmap.lst: $(MARKER_FILES)
329        (for pp in $^; do \
330          b=`basename $$pp .marker`; \
331          if grep 'PARTMAP_LIST_MARKER' $$pp >/dev/null 2>&1; then \
332            echo $$b; \
333          fi; \
334        done) | sort -u > $@
335platform_DATA += partmap.lst
336CLEANFILES += partmap.lst
337
338terminal.lst: $(MARKER_FILES)
339        (for pp in $^; do \
340          b=`basename $$pp .marker`; \
341          sed -n \
342            -e "/INPUT_TERMINAL_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/i\1: $$b/;p;}" \
343            -e "/OUTPUT_TERMINAL_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/o\1: $$b/;p;}" $$pp; \
344        done) | sort -u > $@
345platform_DATA += terminal.lst
346CLEANFILES += terminal.lst
347
348parttool.lst: $(MARKER_FILES)
349        (for pp in $^; do \
350          b=`basename $$pp .marker`; \
351          sed -n \
352            -e "/PARTTOOL_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $$b/;p;}" $$pp; \
353        done) | sort -u > $@
354platform_DATA += parttool.lst
355CLEANFILES += parttool.lst
356
357video.lst: $(MARKER_FILES)
358        (for pp in $^; do \
359          b=`basename $$pp .marker`; \
360          if grep 'VIDEO_LIST_MARKER' $$pp >/dev/null 2>&1; then \
361            echo $$b; \
362          fi; \
363        done) | sort -u > $@
364platform_DATA += video.lst
365CLEANFILES += video.lst
366
367# but, crypto.lst is simply copied
368crypto.lst: $(srcdir)/lib/libgcrypt-grub/cipher/crypto.lst
369        cp $^ $@
370platform_DATA += crypto.lst
371CLEANFILES += crypto.lst
372
373syminfo.lst: gensyminfo.sh kernel_syms.lst $(MODULE_FILES)
374        cat kernel_syms.lst > $@.new
375        for m in $(MODULE_FILES); do \
376          sh $< $$m >> $@.new || exit 1; \
377        done
378        mv $@.new $@
379
380# generate global module dependencies list
381moddep.lst: syminfo.lst genmoddep.awk video.lst
382        cat $< | sort | $(AWK) -f $(srcdir)/genmoddep.awk > $@ || (rm -f $@; exit 1)
383platform_DATA += moddep.lst
384CLEANFILES += config.log syminfo.lst moddep.lst
385
386$(MOD_FILES): %.mod : genmod.sh moddep.lst %.module$(EXEEXT)
387        TARGET_OBJ2ELF=@TARGET_OBJ2ELF@ sh $^ $@
388platform_DATA += $(MOD_FILES)
389platform_DATA += modinfo.sh
390CLEANFILES += $(MOD_FILES)
391
392if COND_ENABLE_EFIEMU
393efiemu32.o: efiemu/runtime/efiemu.c $(TARGET_OBJ2ELF)
394        -rm -f $@
395        -rm -f $@.bin
396        $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m32 -Wall -Werror -nostdlib -static -O2 -c -o $@.bin $<
397        if test "x$(TARGET_APPLE_LINKER)" = x1; then \
398          $(TARGET_OBJCONV) -felf32 -nu -nd $@.bin $@ || exit 1; \
399          rm -f $@.bin ; \
400        elif test ! -z "$(TARGET_OBJ2ELF)"; then \
401          $(TARGET_OBJ2ELF) $@.bin || (rm -f $@.bin; exit 1); \
402          mv $@.bin $@ ; \
403        else \
404          mv $@.bin $@ ; \
405        fi
406
407# Link format -arch,x86_64 means Apple linker
408efiemu64_c.o: efiemu/runtime/efiemu.c
409        $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -nostdlib -Wall -Werror -O2 -mcmodel=large -mno-red-zone -c -o $@ $<
410
411efiemu64_s.o: efiemu/runtime/efiemu.S
412        $(TARGET_CC) $(DEFS) $(INCLUDES) $(CPPFLAGS_EFIEMU) $(CPPFLAGS_DEFAULT) -m64 -Wall -Werror -nostdlib -O2 -mcmodel=large -mno-red-zone -c -o $@ $<
413
414efiemu64.o: efiemu64_c.o efiemu64_s.o $(TARGET_OBJ2ELEF)
415        -rm -f $@
416        -rm -f $@.bin
417        $(TARGET_CC) -m64 $(EFIEMU64_LINK_FORMAT) -nostdlib -static -Wl,-r -o $@.bin $^
418        if test "x$(EFIEMU64_LINK_FORMAT)" = x-arch,x86_64; then \
419          $(TARGET_OBJCONV) -felf64 -nu -nd $@.bin $@ || exit 1; \
420          rm -f $@.bin; \
421        else \
422          mv $@.bin $@ ; \
423        fi
424
425platform_DATA += efiemu32.o efiemu64.o
426CLEANFILES += efiemu32.o efiemu64.o efiemu64_c.o efiemu64_s.o
427endif
428
429windowsdir=$(top_builddir)/$(PACKAGE)-$(VERSION)-for-windows
430windowsdir: $(PROGRAMS) $(starfield_DATA) $(platform_DATA)
431        test -d $(windowsdir)/$(target_cpu)-$(platform) || mkdir $(windowsdir)/$(target_cpu)-$(platform)
432        for x in $(platform_DATA); do \
433                cp -fp $$x $(windowsdir)/$(target_cpu)-$(platform)/$$x; \
434        done
Note: See TracBrowser for help on using the repository browser.