2009-08-23 Robert Millan <rmh.grub@aybabtu.com>
[grub2/phcoder/solaris.git] / conf / i386-pc.rmk
blob13aaa2618f931827400b29b7ce361ef40d162543
1 # -*- makefile -*-
3 GRUB_KERNEL_MACHINE_LINK_ADDR = 0x8200
5 COMMON_ASFLAGS = -nostdinc -fno-builtin -m32
6 COMMON_CFLAGS = -fno-builtin -mrtd -mregparm=3 -m32
7 COMMON_LDFLAGS = -m32 -nostdlib
9 # Used by various components.  These rules need to precede them.
10 script/sh/lexer.c_DEPENDENCIES = grub_script.tab.h
12 # Images.
13 pkglib_IMAGES = boot.img cdboot.img diskboot.img kernel.img lnxboot.img \
14         pxeboot.img
16 # For boot.img.
17 boot_img_SOURCES = boot/i386/pc/boot.S
18 boot_img_ASFLAGS = $(COMMON_ASFLAGS)
19 boot_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)7C00
20 boot_img_FORMAT = binary
22 # For pxeboot.img
23 pxeboot_img_SOURCES = boot/i386/pc/pxeboot.S
24 pxeboot_img_ASFLAGS = $(COMMON_ASFLAGS)
25 pxeboot_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)7C00
26 pxeboot_img_FORMAT = binary
28 # For diskboot.img.
29 diskboot_img_SOURCES = boot/i386/pc/diskboot.S
30 diskboot_img_ASFLAGS = $(COMMON_ASFLAGS)
31 diskboot_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)8000
32 diskboot_img_FORMAT = binary
34 # For lnxboot.img.
35 lnxboot_img_SOURCES = boot/i386/pc/lnxboot.S
36 lnxboot_img_ASFLAGS = $(COMMON_ASFLAGS)
37 lnxboot_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)6000
38 lnxboot_img_FORMAT = binary
40 # For cdboot.img.
41 cdboot_img_SOURCES = boot/i386/pc/cdboot.S
42 cdboot_img_ASFLAGS = $(COMMON_ASFLAGS)
43 cdboot_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)7C00
44 cdboot_img_FORMAT = binary
46 # For kernel.img.
47 kernel_img_SOURCES = kern/i386/pc/startup.S \
48         kern/i386/misc.S \
49         kern/main.c kern/device.c \
50         kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
51         kern/misc.c kern/mm.c kern/reader.c kern/term.c \
52         kern/rescue_parser.c kern/rescue_reader.c \
53         kern/time.c kern/list.c kern/handler.c kern/command.c kern/corecmd.c \
54         kern/$(target_cpu)/dl.c kern/i386/pc/init.c kern/i386/pc/mmap.c \
55         kern/parser.c kern/partition.c \
56         kern/i386/tsc.c kern/i386/pit.c \
57         kern/generic/rtc_get_time_ms.c \
58         kern/generic/millisleep.c \
59         kern/env.c \
60         term/i386/pc/console.c term/i386/vga_common.c \
61         symlist.c
62 kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
63         env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
64         partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
65         machine/biosdisk.h machine/boot.h machine/console.h machine/init.h \
66         machine/memory.h machine/loader.h machine/vga.h machine/vbe.h \
67         machine/kernel.h machine/pxe.h i386/pit.h list.h handler.h command.h
68 kernel_img_CFLAGS = $(COMMON_CFLAGS)  $(TARGET_IMG_CFLAGS)
69 kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
70 kernel_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)$(GRUB_KERNEL_MACHINE_LINK_ADDR) $(COMMON_CFLAGS)
71 kernel_img_FORMAT = binary
73 MOSTLYCLEANFILES += symlist.c kernel_syms.lst
74 DEFSYMFILES += kernel_syms.lst
76 symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
77         /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
79 kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
80         /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
82 # Utilities.
83 bin_UTILITIES = grub-mkimage
84 sbin_UTILITIES = grub-setup grub-mkdevicemap
85 ifeq ($(enable_grub_emu), yes)
86 sbin_UTILITIES += grub-emu
87 endif
89 # For grub-mkimage.
90 grub_mkimage_SOURCES = util/i386/pc/grub-mkimage.c util/misc.c \
91         util/resolve.c lib/LzmaEnc.c lib/LzFind.c
92 grub_mkimage_CFLAGS = -DGRUB_KERNEL_MACHINE_LINK_ADDR=$(GRUB_KERNEL_MACHINE_LINK_ADDR)
93 util/i386/pc/grub-mkimage.c_DEPENDENCIES = Makefile
95 # For grub-setup.
96 util/i386/pc/grub-setup.c_DEPENDENCIES = grub_setup_init.h
97 grub_setup_SOURCES = util/i386/pc/grub-setup.c util/hostdisk.c  \
98         util/misc.c util/getroot.c kern/device.c kern/disk.c    \
99         kern/err.c kern/misc.c kern/parser.c kern/partition.c   \
100         kern/file.c kern/fs.c kern/env.c fs/fshelp.c            \
101         \
102         fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c         \
103         fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c  \
104         fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c          \
105         fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/befs.c fs/tar.c                 \
106         \
107         partmap/msdos.c partmap/gpt.c                           \
108         \
109         disk/raid.c disk/mdraid_linux.c disk/lvm.c              \
110         util/raid.c util/lvm.c                                  \
111         grub_setup_init.c
113 # For grub-mkdevicemap.
114 grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/deviceiter.c \
115         util/devicemap.c util/misc.c
117 # For grub-emu.
118 util/grub-emu.c_DEPENDENCIES = grub_emu_init.h
119 grub_emu_SOURCES = commands/minicmd.c commands/cat.c commands/cmp.c     \
120         commands/configfile.c commands/echo.c commands/help.c           \
121         commands/handler.c commands/ls.c commands/test.c                \
122         commands/search.c commands/blocklist.c commands/hexdump.c       \
123         lib/hexdump.c commands/i386/pc/halt.c commands/reboot.c         \
124         commands/gptsync.c commands/probe.c commands/xnu_uuid.c         \
125         commands/i386/cpuid.c   \
126         disk/host.c disk/loopback.c disk/scsi.c                         \
127         fs/fshelp.c     \
128         \
129         io/gzio.c                                                       \
130         kern/device.c kern/disk.c kern/dl.c kern/elf.c kern/env.c       \
131         kern/err.c kern/list.c kern/handler.c                           \
132         kern/command.c kern/corecmd.c commands/extcmd.c kern/file.c     \
133         kern/fs.c commands/boot.c kern/main.c kern/misc.c kern/parser.c \
134         kern/partition.c kern/reader.c kern/term.c                      \
135         kern/rescue_reader.c kern/rescue_parser.c                       \
136         lib/arg.c normal/cmdline.c normal/datetime.c normal/misc.c      \
137         normal/handler.c normal/autofs.c                                \
138         normal/completion.c normal/main.c normal/color.c                \
139         normal/menu.c normal/menu_entry.c normal/menu_viewer.c          \
140         normal/menu_text.c                                              \
141         script/sh/main.c script/sh/execute.c script/sh/function.c       \
142         script/sh/lexer.c script/sh/script.c grub_script.tab.c          \
143         partmap/amiga.c partmap/apple.c partmap/msdos.c partmap/sun.c   \
144         partmap/acorn.c partmap/gpt.c                                   \
145         \
146         fs/affs.c fs/cpio.c  fs/fat.c fs/ext2.c fs/hfs.c                \
147         fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c          \
148         fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c                  \
149         fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/befs.c fs/tar.c                         \
150         \
151         util/console.c util/hostfs.c util/grub-emu.c util/misc.c        \
152         util/hostdisk.c util/getroot.c                                  \
153         \
154         disk/raid.c disk/raid5_recover.c disk/raid6_recover.c           \
155         disk/mdraid_linux.c disk/dmraid_nvidia.c disk/lvm.c             \
156         commands/parttool.c parttool/msdospart.c                                \
157         grub_emu_init.c
159 grub_emu_LDFLAGS = $(LIBCURSES)
161 ifeq ($(enable_grub_emu_usb), yes)
162 grub_emu_SOURCES += disk/usbms.c util/usb.c bus/usb/usb.c       \
163                 commands/usbtest.c
164 grub_emu_LDFLAGS += $(LIBCURSES) $(LIBUSB)
165 endif
167 # Scripts.
168 sbin_SCRIPTS = grub-install
169 bin_SCRIPTS = grub-mkrescue
171 # For grub-install.
172 grub_install_SOURCES = util/i386/pc/grub-install.in
174 # For grub-mkrescue.
175 grub_mkrescue_SOURCES = util/i386/pc/grub-mkrescue.in
177 pkglib_MODULES = biosdisk.mod chain.mod \
178         multiboot.mod reboot.mod halt.mod       \
179         vbe.mod vbetest.mod vbeinfo.mod play.mod serial.mod     \
180         ata.mod vga.mod memdisk.mod pci.mod lspci.mod   \
181         aout.mod bsd.mod pxe.mod pxecmd.mod datetime.mod date.mod \
182         datehook.mod lsmmap.mod ata_pthru.mod hdparm.mod \
183         usb.mod uhci.mod ohci.mod usbtest.mod usbms.mod usb_keyboard.mod \
184         efiemu.mod mmap.mod acpi.mod drivemap.mod
186 # For boot.mod.
187 pkglib_MODULES += boot.mod 
188 boot_mod_SOURCES = commands/boot.c lib/i386/pc/biosnum.c
189 boot_mod_CFLAGS = $(COMMON_CFLAGS)
190 boot_mod_LDFLAGS = $(COMMON_LDFLAGS)
192 # For drivemap.mod.
193 drivemap_mod_SOURCES = commands/i386/pc/drivemap.c \
194                        commands/i386/pc/drivemap_int13h.S
195 drivemap_mod_ASFLAGS = $(COMMON_ASFLAGS)
196 drivemap_mod_CFLAGS = $(COMMON_CFLAGS)
197 drivemap_mod_LDFLAGS = $(COMMON_LDFLAGS)
199 # For efiemu.mod.
200 efiemu_mod_SOURCES = efiemu/main.c efiemu/i386/loadcore32.c \
201                      efiemu/i386/loadcore64.c efiemu/i386/pc/cfgtables.c \
202                      efiemu/mm.c efiemu/loadcore_common.c efiemu/symbols.c \
203                      efiemu/loadcore32.c efiemu/loadcore64.c \
204                      efiemu/prepare32.c efiemu/prepare64.c efiemu/pnvram.c \
205                      efiemu/i386/coredetect.c
206 efiemu_mod_CFLAGS = $(COMMON_CFLAGS)
207 efiemu_mod_LDFLAGS = $(COMMON_LDFLAGS)
209 # For acpi.mod.
210 acpi_mod_SOURCES = commands/acpi.c commands/i386/pc/acpi.c
211 acpi_mod_CFLAGS = $(COMMON_CFLAGS)
212 acpi_mod_LDFLAGS = $(COMMON_LDFLAGS)
214 # For mmap.mod.
215 mmap_mod_SOURCES = mmap/mmap.c mmap/i386/uppermem.c mmap/i386/mmap.c \
216                    mmap/i386/pc/mmap.c mmap/i386/pc/mmap_helper.S
217 mmap_mod_CFLAGS = $(COMMON_CFLAGS)
218 mmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
219 mmap_mod_ASFLAGS = $(COMMON_ASFLAGS)
221 # For biosdisk.mod.
222 biosdisk_mod_SOURCES = disk/i386/pc/biosdisk.c
223 biosdisk_mod_CFLAGS = $(COMMON_CFLAGS)
224 biosdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
226 # For chain.mod.
227 chain_mod_SOURCES = loader/i386/pc/chainloader.c
228 chain_mod_CFLAGS = $(COMMON_CFLAGS)
229 chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
231 pkglib_MODULES += linux16.mod
232 linux16_mod_SOURCES = loader/i386/pc/linux.c
233 linux16_mod_CFLAGS = $(COMMON_CFLAGS)
234 linux16_mod_LDFLAGS = $(COMMON_LDFLAGS)
236 pkglib_MODULES += linux.mod
237 linux_mod_SOURCES = loader/i386/linux.c
238 linux_mod_CFLAGS = $(COMMON_CFLAGS)
239 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
241 pkglib_MODULES += xnu.mod
242 xnu_mod_SOURCES = loader/xnu_resume.c loader/i386/xnu.c loader/i386/pc/xnu.c\
243          loader/macho.c loader/xnu.c loader/i386/xnu_helper.S
244 xnu_mod_CFLAGS = $(COMMON_CFLAGS)
245 xnu_mod_LDFLAGS = $(COMMON_LDFLAGS)
246 xnu_mod_ASFLAGS = $(COMMON_ASFLAGS)
248 # For reboot.mod.
249 reboot_mod_SOURCES = commands/reboot.c
250 reboot_mod_CFLAGS = $(COMMON_CFLAGS)
251 reboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
253 # For halt.mod.
254 halt_mod_SOURCES = commands/i386/pc/halt.c
255 halt_mod_CFLAGS = $(COMMON_CFLAGS)
256 halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
258 # For serial.mod.
259 serial_mod_SOURCES = term/i386/pc/serial.c
260 serial_mod_CFLAGS = $(COMMON_CFLAGS)
261 serial_mod_LDFLAGS = $(COMMON_LDFLAGS)
263 # For multiboot.mod.
264 multiboot_mod_SOURCES = loader/i386/multiboot.c \
265                         loader/i386/multiboot_helper.S \
266                         loader/i386/pc/multiboot2.c \
267                         loader/multiboot2.c \
268                         loader/multiboot_loader.c
269 multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
270 multiboot_mod_LDFLAGS = $(COMMON_LDFLAGS)
271 multiboot_mod_ASFLAGS = $(COMMON_ASFLAGS)
273 # For vbe.mod.
274 vbe_mod_SOURCES = video/i386/pc/vbe.c
275 vbe_mod_CFLAGS = $(COMMON_CFLAGS)
276 vbe_mod_LDFLAGS = $(COMMON_LDFLAGS)
278 # For vbeinfo.mod.
279 vbeinfo_mod_SOURCES = commands/i386/pc/vbeinfo.c
280 vbeinfo_mod_CFLAGS = $(COMMON_CFLAGS)
281 vbeinfo_mod_LDFLAGS = $(COMMON_LDFLAGS)
283 # For vbetest.mod.
284 vbetest_mod_SOURCES = commands/i386/pc/vbetest.c
285 vbetest_mod_CFLAGS = $(COMMON_CFLAGS)
286 vbetest_mod_LDFLAGS = $(COMMON_LDFLAGS)
288 # For play.mod.
289 play_mod_SOURCES = commands/i386/pc/play.c
290 play_mod_CFLAGS = $(COMMON_CFLAGS)
291 play_mod_LDFLAGS = $(COMMON_LDFLAGS)
293 # For ata.mod.
294 ata_mod_SOURCES = disk/ata.c
295 ata_mod_CFLAGS = $(COMMON_CFLAGS)
296 ata_mod_LDFLAGS = $(COMMON_LDFLAGS)
298 # For vga.mod.
299 vga_mod_SOURCES = term/i386/pc/vga.c
300 vga_mod_CFLAGS = $(COMMON_CFLAGS)
301 vga_mod_LDFLAGS = $(COMMON_LDFLAGS)
303 # For memdisk.mod.
304 memdisk_mod_SOURCES = disk/memdisk.c
305 memdisk_mod_CFLAGS = $(COMMON_CFLAGS)
306 memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
308 # For pci.mod
309 pci_mod_SOURCES = bus/pci.c
310 pci_mod_CFLAGS = $(COMMON_CFLAGS)
311 pci_mod_LDFLAGS = $(COMMON_LDFLAGS)
313 # For lspci.mod
314 lspci_mod_SOURCES = commands/lspci.c
315 lspci_mod_CFLAGS = $(COMMON_CFLAGS)
316 lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
318 # For aout.mod
319 aout_mod_SOURCES = loader/aout.c
320 aout_mod_CFLAGS = $(COMMON_CFLAGS)
321 aout_mod_LDFLAGS = $(COMMON_LDFLAGS)
323 # For bsd.mod
324 bsd_mod_SOURCES = loader/i386/bsd.c loader/i386/bsd32.c loader/i386/bsd64.c loader/i386/bsd_helper.S loader/i386/bsd_trampoline.S
325 bsd_mod_CFLAGS = $(COMMON_CFLAGS)
326 bsd_mod_LDFLAGS = $(COMMON_LDFLAGS)
327 bsd_mod_ASFLAGS = $(COMMON_ASFLAGS)
329 # For usb.mod
330 usb_mod_SOURCES = bus/usb/usb.c bus/usb/usbtrans.c bus/usb/usbhub.c
331 usb_mod_CFLAGS = $(COMMON_CFLAGS)
332 usb_mod_LDFLAGS = $(COMMON_LDFLAGS)
334 # For usbtest.mod
335 usbtest_mod_SOURCES = commands/usbtest.c
336 usbtest_mod_CFLAGS = $(COMMON_CFLAGS)
337 usbtest_mod_LDFLAGS = $(COMMON_LDFLAGS)
339 # For uhci.mod
340 uhci_mod_SOURCES = bus/usb/uhci.c
341 uhci_mod_CFLAGS = $(COMMON_CFLAGS)
342 uhci_mod_LDFLAGS = $(COMMON_LDFLAGS)
344 # For ohci.mod
345 ohci_mod_SOURCES = bus/usb/ohci.c
346 ohci_mod_CFLAGS = $(COMMON_CFLAGS)
347 ohci_mod_LDFLAGS = $(COMMON_LDFLAGS)
349 # For usbms.mod
350 usbms_mod_SOURCES = disk/usbms.c
351 usbms_mod_CFLAGS = $(COMMON_CFLAGS)
352 usbms_mod_LDFLAGS = $(COMMON_LDFLAGS)
354 # For usb_keyboard.mod
355 usb_keyboard_mod_SOURCES = term/usb_keyboard.c
356 usb_keyboard_mod_CFLAGS = $(COMMON_CFLAGS)
357 usb_keyboard_mod_LDFLAGS = $(COMMON_LDFLAGS)
359 # For pxe.mod
360 pxe_mod_SOURCES = fs/i386/pc/pxe.c
361 pxe_mod_CFLAGS = $(COMMON_CFLAGS)
362 pxe_mod_LDFLAGS = $(COMMON_LDFLAGS)
364 # For pxecmd.mod
365 pxecmd_mod_SOURCES = commands/i386/pc/pxecmd.c
366 pxecmd_mod_CFLAGS = $(COMMON_CFLAGS)
367 pxecmd_mod_LDFLAGS = $(COMMON_LDFLAGS)
369 # For datetime.mod
370 datetime_mod_SOURCES = lib/i386/datetime.c
371 datetime_mod_CFLAGS = $(COMMON_CFLAGS)
372 datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
374 # For date.mod
375 date_mod_SOURCES = commands/date.c
376 date_mod_CFLAGS = $(COMMON_CFLAGS)
377 date_mod_LDFLAGS = $(COMMON_LDFLAGS)
379 # For datehook.mod
380 datehook_mod_SOURCES = hook/datehook.c
381 datehook_mod_CFLAGS = $(COMMON_CFLAGS)
382 datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
384 # For lsmmap.mod
385 lsmmap_mod_SOURCES = commands/lsmmap.c
386 lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
387 lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
389 # For ata_pthru.mod.
390 ata_pthru_mod_SOURCES = disk/ata_pthru.c
391 ata_pthru_mod_CFLAGS = $(COMMON_CFLAGS)
392 ata_pthru_mod_LDFLAGS = $(COMMON_LDFLAGS)
394 # For hdparm.mod.
395 hdparm_mod_SOURCES = commands/hdparm.c lib/hexdump.c
396 hdparm_mod_CFLAGS = $(COMMON_CFLAGS)
397 hdparm_mod_LDFLAGS = $(COMMON_LDFLAGS)
399 ifeq ($(enable_efiemu), yes)
401 efiemu32.o: efiemu/runtime/efiemu.c $(TARGET_OBJ2ELF)
402         -rm -f $@
403 ifeq ($(TARGET_APPLE_CC), 1)
404         -rm -f $@.bin
405         $(TARGET_CC) -c -m32 -DELF32 -DAPPLE_CC -o $@.bin -Wall -Werror $< -nostdlib -O2 -I$(srcdir)/efiemu/runtime -I$(srcdir)/include -Iinclude
406         $(OBJCONV) -felf32 -nu -nd $@.bin $@
407         -rm -f $@.bin
408 else
409         $(TARGET_CC) -c -m32 -DELF32 -o $@ -Wall -Werror $< -nostdlib -O2 -I$(srcdir)/efiemu/runtime -I$(srcdir)/include -Iinclude
410         if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
411 endif
413 efiemu64_c.o: efiemu/runtime/efiemu.c
414 ifeq ($(TARGET_APPLE_CC), 1)
415         $(TARGET_CC) -c -m64 -DAPPLE_CC=1 -DELF64 -o $@ -Wall -Werror $< -nostdlib -mno-red-zone -O2 -I$(srcdir)/efiemu/runtime -I$(srcdir)/include -Iinclude
416 else
417         $(TARGET_CC) -c -m64 -DELF64 -o $@ -Wall -Werror $< -nostdlib  -mcmodel=large -mno-red-zone -O2 -I$(srcdir)/efiemu/runtime -I$(srcdir)/include -Iinclude
418 endif
420 efiemu64_s.o: efiemu/runtime/efiemu.S
421         -rm -f $@
422 ifeq ($(TARGET_APPLE_CC), 1)
423         $(TARGET_CC) -c -m64 -DAPPLE_CC=1 -DELF64 -o $@ -Wall -Werror $< -nostdlib -mno-red-zone -O2 -I$(srcdir)/efiemu/runtime -I$(srcdir)/include -Iinclude
424 else
425         $(TARGET_CC) -c -m64 -DELF64 -o $@ -Wall -Werror $< -nostdlib  -mcmodel=large -mno-red-zone -O2 -I$(srcdir)/efiemu/runtime -I$(srcdir)/include -Iinclude
426 endif
428 efiemu64.o: efiemu64_c.o efiemu64_s.o  $(TARGET_OBJ2ELF)
429         -rm -f $@
430 ifeq ($(TARGET_APPLE_CC), 1)
431         -rm -f $@.bin
432         $(TARGET_CC) -m64 -o $@.bin -Wl,-r $^ -nostdlib
433         $(OBJCONV) -felf64 -nu -nd $@.bin $@
434         -rm -f $@.bin
435 else
436         $(TARGET_CC) -m64 -o $@ -Wl,-r $^ -nostdlib
437         if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
438 endif
440 CLEANFILES += efiemu32.o efiemu64.o efiemu64_c.o efiemu64_s.o
441 pkglib_DATA += efiemu32.o efiemu64.o
443 endif
445 include $(srcdir)/conf/i386.mk
446 include $(srcdir)/conf/common.mk